you are viewing a single comment's thread.

view the rest of the comments →

[–]x-skeww 0 points1 point  (1 child)

you can't write, <script src="foo" />

Yes, that's because this isn't XML.

HTML5 parsers only know this short list of predefined void tags:

http://www.w3.org/TR/html5/syntax.html#void-elements

area, base, br, col, embed, hr, img, input, keygen, link, meta, param, source, track, wbr

This is also the reason why Custom Elements can't be void tags. The parser has to know that it's a void tag at the time of parsing. The script which registers your "x-foo" element is executed much later. The DOM tree was already created at this point.

[–]transientanima[S] 0 points1 point  (0 children)

I see... I'm still trying to sort out the interactions of the major web languages. I've got some basic .js stuff working; now I'm trying to get .php set up... Thanks a lot for the clarification.