System.import()?

Alexander Jones 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:

> From: es-discuss [mailto:es-discuss-bounces at mozilla.org <javascript:;>]
> On Behalf Of James Burke
>
>
> > In the spirit of the extensible web, defining these lower level APIs and
> more
> > 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
> syntax.
>
> No, custom elements cannot prototype the module tag, because custom
> elements will always be parsed as unknown elements. So e.g.
>
> ```html
> <custom-module>
> const stuff = "<p>Stuff</p>";
> </custom-module>
> ```
>
> will be parsed as
>
> ```
> custom-module
> |- 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
> es-discuss at mozilla.org <javascript:;>
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150821/bb47f316/attachment.html>


More information about the es-discuss mailing list