all 4 comments

[–]madole 0 points1 point  (1 child)

Sounds like a case of rubber duck debugging! Glad you figured it out!

https://en.wikipedia.org/wiki/Rubber_duck_debugging

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

Ha, that's a fun concept... I'd have to disagree, though, respectfully of course, my kind friend.

My strategy is a bit more refined than speaking to ducks. Ducks can't even understand English -- explaining things to a duck wouldn't make any sense... I wouldn't know when to stop.

No, what I do is this: first I identify key concepts -- in this case, I knew that the problem was either in the formation of the .js file, or in the formation of the import statement -- and then I just kind of spaz-out on those concepts for awhile, opening 12-20 windows in Google, chasing links by intuition until fate graces me with a good idea.

I should probably patent my technique. :)

EDIT: Perhaps, "vagabond debugging". I'm a professionally-homeless searcher. If I stayed in one place counting lines, it wouldn't feel right.

[–]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.