-
-
Couldn't load subscription status.
- Fork 5
Open
Labels
scope: mustachespecSpec definition for non-well defined behaviorsSpec definition for non-well defined behaviors
Milestone
Description
Scope
mustache
What do you want to define?
While the implemented parser is able to parse triple mustaches with the intention of injecting raw html, its "support" is not routed into the directive for the following reasons:
- It's not that trivial to inject raw html in this case:
- The
Textnode must be splitted in order to inject the html in-between - Injected html must be somewhat marked as "virtual" because they're not part of the document the user provided
- It could probably be solved using the directive cache with a
WeakMap<Text, WeakSet<HTMLElement>>mapping
- It could probably be solved using the directive cache with a
- The
- It's not clear whether injected html should then be processed by the mizu renderer
- Usually mustache engines prevent re-interpolation, so if the rendered html contains a nested mustache directive, technically it could be seen as re-interpolation
- Should reactivity also applies to interpolated html in this case ?
- It could cause some issues in rendering since these interpolated elements may become orphan by the time the mustache directive is rendered again. I don't think it'd cause too much issue, probably just wasted computing time (though iirc element without an
ownerDocumentare now skipped by reactive renders)
- It could cause some issues in rendering since these interpolated elements may become orphan by the time the mustache directive is rendered again. I don't think it'd cause too much issue, probably just wasted computing time (though iirc element without an
- The
*htmldirective can be used as a workaround, so this leave time for this to be discussed and thought about- Documentation has been patched to inform users about this behavior
<template *mustache>
Hello {{{ `<i>foo</i>` }}} bar
</template>I have searched for existing issues
Yes
Metadata
Metadata
Assignees
Labels
scope: mustachespecSpec definition for non-well defined behaviorsSpec definition for non-well defined behaviors