Skip to content
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

self closing form of templates results next element being removed #283

Closed
cjdibbs opened this issue Dec 31, 2015 · 1 comment
Closed

self closing form of templates results next element being removed #283

cjdibbs opened this issue Dec 31, 2015 · 1 comment

Comments

@cjdibbs
Copy link

cjdibbs commented Dec 31, 2015

using the following code:

<require from="poker-card.html" ></require>
...
<poker-card ... />
<div id='cookie'>
    <span>${myself.name}</span>
</div>

results in the div#cookie to be eaten by some monster, clearly I should use the non-self closing form of the tag (which works with out issue)

I would suggest either fixing it so you can use a self closing form, or making it so that the build process will throw an error.

@EisenbergEffect
Copy link
Contributor

There is no such thing as custom self-closing tags in HTML. The spec defines that only certain, special HTML element can be self-closing. It's beyond the power of any framework to change this since it's part of the HTML spec and enforced by the browser itself.

It is conceivable that we could try to add something to our bundler to check this...but it would involve bringing in a full spec-compliant HTML parser. I'm not sure if we want to do that just for this use case now. However, there are other things in the future that we might add that for, so this is something we could consider if others want it later down the line.

Best thing to know is that self-closing elements aren't allowed outside of the ones defined by the spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants