HTML imports in Firefox

I was a little surprised to read Mozilla don't plan on shipping HTML
imports and will re-evaluate after modules are supported:
https://hacks.mozilla.org/2014/12/mozilla-and-web-components/

Why would modules affect the decision to ship HTML imports? Imports get you:

- the ability to import style and markup, not just script
- a tree-like dependency structure with automatic deduplication
- parallel loading/parsing
- ability to start fetching sub-resources before script has parsed and run
- tidy markup (sub-resources go in their import documents, not all dumped
in to <head>)

I don't see how modules has any impact on this. In a web environment where
components will commonly use style, templates and the like, imports seem
like the obvious choice over modules.

The webcomponents.org polyfill for imports has a couple of caveats, so it
doesn't look like it's totally equivalent and portable with browsers with
native support, like Chrome which has shipped it already. I'm keen to see
Mozilla ship this feature too.

Ashley

Received on Monday, 15 December 2014 18:10:32 UTC