2 ms·
It _is_ an HTML (and CSS) subset. JavaScript is used to implement custom elements, like amp-image. That's just how custom elements work.
by spankalee 11y ago
It _is_ an HTML (and CSS) subset.
JavaScript is used to implement custom elements, like amp-image. That's just how custom elements work.
- TazeTSchnitzel 11y agoIt's not a subset, it's not a superset. It lacks some HTML things and adds new ones.
- spankalee 11y agoCustom elements are a part of HTML, they can be part of a subset. Disqualifying custom elements from an HTML subset would be like claiming function declarations can't be in subsets of JavaScript.
- TazeTSchnitzel 11y agoThat's not really the same... HTML elements are more like keywords than functions.
- spankalee 11y agoNot really. To continue the analogy, in HTML doesn't really have keywords, but has syntax in the form of brackets, quotes, =, etc. Tags are like function calls, and the built in tags are like the standard library. Until custom elements you couldn't declare "functions".