4 ms·
TIL <amp-img> is a standard HTML tag that works without loading the AMP JS. AMP supports a subset of standard HTML, plus a whole bunch of AMP-specific extensio
by plorkyeran 8y ago
TIL <amp-img> is a standard HTML tag that works without loading the AMP JS.
AMP supports a subset of standard HTML, plus a whole bunch of AMP-specific extensions. That's a significantly different thing from being just a safe subset of HTML.
- joshuamorton 8y agohttps://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements https://developer.mozilla.org/en-US/docs/Web/Web_Components/... Webcomponent custom elements are part of the HTML5 standard. `<literally-any-element-name-i-want-here>` is a valid subset of html. You added the "standard" modifier, which like, I mean, WebComponents are part of the standard, so using them is still a subset of standard HTML. If you mean "they should have limited themselves to using older HTML APIs and doing custom polyfills based on css-classes instead of element names", which is probably closer to what you actually mean, I'd ask why. The behavior would, in general, still be the same. You'd be required to include some metadata information, you'd be restricted to some amp.js provided to you, and you'd need to use class='amp-html' instead of <amp-html>. And that would be the entire difference.