alex at weej.com
Fri Aug 21 20:54:35 UTC 2015
and this is why XHTML...
On Friday, August 21, 2015, Domenic Denicola <d at domenic.me> wrote:
> On Behalf Of James Burke
> > In the spirit of the extensible web, defining these lower level APIs and
> > of the loader would make it possible to use custom elements to help
> > prototype a <module> tag. The custom element mechanism can be used in a
> > similar way to how JS transpilers are used for the existing module
> No, custom elements cannot prototype the module tag, because custom
> elements will always be parsed as unknown elements. So e.g.
> const stuff = "<p>Stuff</p>";
> will be parsed as
> |- text node: const stuff = "
> |- p
> |---- text node: Stuff
> | - text node: ";
> and of course it gets much worse if you use any elements that do something
> visual or interesting, like `<img>` or `<custom-module>` or `<script>`.
> This is why we need to use an existing parsed-as-is element (namely
> `<script>`, although I guess we could maybe make `<style>` work in a
> pinch), and why custom elements won't work.
> es-discuss mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss