-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[templates] How to handle expressions in tables #703
Comments
Parser changes can be limited to cases where the first non-whitespace chars are |
If there are parser changes, I think we might still need a syntax fallback for older browsers using a template parts polyfill. |
@justinfagnani Am I reading this right, is the idea that you can pass something like a DocumentFragment as |
@matthewp yes, the key type allowed besides Strings are Nodes, especially TemplateInstance form this proposal. |
TPAC: consensus for parser changes. |
I don't think anyone from mozilla parser team has weighed in yet. cc / @hsivonen |
Apologies, I just wanted to capture what happened in the room, it wasn't definitive (but I see how it can be read like that). |
That problem can be addressed purely symptomatically with a couple of strong heuristics.
These two conditions I believe exclude practical chance user meant to place |
As discovered in templize and uce-template, the simplest workaround is <template>
<table>
<!--{{rows}}-->
</table>
</template> It has zero cost from performance/code size perspective. |
Currently, this won't parse in a way that's useful for dynamically creating tables:
because the
{{rows}}
text will be fostered to before the table.A couple of options are:
<!--{{rows}}-->
or<?{{rows}}>
<template>
so that disallowed content is not fostered.The text was updated successfully, but these errors were encountered: