-
Notifications
You must be signed in to change notification settings - Fork 378
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
Parse <slot> like <template> #59
Comments
Should we consider this for |
This makes some sense given the use cases suggested in #95 too. |
If we're making this change, it's better done in v1 than v2. Changing the parser behavior of an element after it started getting used is extremely risky. |
@hayatoito @dglazkov thoughts? |
👍 |
It probably doesn't make sense for slot element to appear within a |
Should I mention it as a monkey patch in Shadow DOM spec? |
The
On the other hand, It looks |
More important is the maaaany changes to the parser that are necessary for template. I guess they'll need to be generalized... |
@hayatoito that is the easy part. Search for "template" in https://html.spec.whatwg.org/multipage/syntax.html. Monkey patching that is the hard part here and the most important for correct parser implementations. And note that we cannot do the exact same thing as for |
In addition to needing a consensus, someone needs to make a concrete proposal. |
So I'm trying to figure out when we need this complexity and it seems given the restrictions on
meaning the I'm not opposed to changing the HTML parser so that this kind of thing will be possible in the future once |
If we make Also see #113 (comment) |
Wouldn't making custom elements parse like template be a backward-incompatible change? |
Yes, but only if you have broken markup to begin with, I believe. But certainly it's not zero-risk. Same with supporting |
That seems quite risky to me. |
Which part, parsing as I analyzed httparchive for |
I don't care strongly what we do here, but this is something we need to decide on soon. This basically blocks both Shadow DOM and custom elements. Parsing custom elements like |
tl;dr: I can live with different parsing for Rendering of If people working on this see a clear benefit for |
I think @hayatoito and also @dglazkov would ideally like to allow these kind of scenarios, as posted by @hayatoito elsewhere: Light tree:
If we want to enable that, we will need to change parsing for both custom and
The upside is that it would be quite neat to be able to do the above and make HTML a lot more extensible. |
I'm strongly opposed to parsing custom elements like |
Going to untag this as custom elements since it seems like nobody has the stomach for that kind of change. I agree it would have been nice but oh well. |
Then we should probably not do it for |
Telecon agreement: don't change the parser. A variety of alternatives are possible and can be pursued in the future, to solve the underlying problems, but the appetite for changing the parser is too low. If it turns out this is super-popular, there will be workarounds possible via libraries, and we can reconsider. |
See https://lists.w3.org/Archives/Public/public-whatwg-archive/2012Jan/thread.html#msg130 for context.
The text was updated successfully, but these errors were encountered: