-
Notifications
You must be signed in to change notification settings - Fork 2k
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
<core-style> should use an element that parses in plain text mode #637
Comments
An alternative is to use a nested element like:
|
Can you explain why the nested element is different from the first example? |
It's not really different, depends on what polymer prefers. Doing is@ syntax also means that when using the style the custom element can just change itself directly and not appendChild a sibling. ex.
|
So, both of your examples are 'the good way'? Reading your first post, it sounded like you were saying if we did it as in the example you provided, there would be an alert. Sorry if I'm being dense. I understand the notion of using a special type to avoid the parser becoming confused. It seemed like you were pointing to a derivative problem, but I likely read too much in. |
Oh sorry, I wrote this bug in the most confusing way possible. Currently does this:
which will alert, since the content of the core-style is parsed as tags. So polymer should either use <style is="core-style" type="polymer"> (or <script>) or use a nested <style> inside the <core-style>. It's also bad to use the text content since the parser is not in the fast text mode for large style blocks. |
Thanks for highlighting this Elliot. We actually may want to allow elements inside |
auto-moving this issue to googlearchive/core-style#5 and closing this one |
ex.
Using today to do that will alert since it just has random HTML inside it which is both slower for the parser, and will interpret stuff inside it as tags. Instead it should work as above.
The text was updated successfully, but these errors were encountered: