-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add failing test for declarative shadow-dom #66
base: main
Are you sure you want to change the base?
Conversation
This is an intentional limitation of the proposed content-tag format. For it to be agnostic about the interior language, it can't allow unescaped |
I don't believe this, it doesn't make sense? At least, with how I understand your words, it forbids folks from ever using The Platform for stuff like this: https://developer.chrome.com/docs/css-ui/declarative-shadow-dom (or whatever else can be done with
This seems reasonable to me. We shouldn't be allowing any unescaped tag anyway. |
// https://developer.chrome.com/docs/css-ui/declarative-shadow-dom | ||
let input = ` | ||
<template> | ||
<template shadowrootmode="open"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Read more carefully, I said it's not allowed without escaping. For the same reason that a single-quoted Javascript string literal has an intentional limitation that you can't use unescaped single quotes in them. The point here is that content-tag is supposed to work regardless of the interior language. For that to be possible, the outside language (content-tag itself) needs to claim some delimiter to mark the end, and if the interior languages wants to use that delimiter it needs to be escaped. |
do we have a means to escape? |
We have to design it. It could be as simple as `\</template>` means literal
`</template>` and `\\</template>` means literal `\</template>`.
Alternatively we could make some pragma that defines a custom delimiter,
kind of like a Ruby Here Document.
…On Tue, Feb 20, 2024 at 3:21 PM NullVoxPopuli ***@***.***> wrote:
do we have a means to escape?
—
Reply to this email directly, view it on GitHub
<#66 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACN6MQKQ33NOT3LT2ZJXTDYUUAWHAVCNFSM6AAAAABCVKCR32VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJUHE4TSNZTGY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Recapping from the spec meeting, and "having had time to sleep on it", I think supporting a
that would be kind of annoying to switch |
Support: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template