[whatwg] defer on style, depends

Sometimes a document's resources are not needed all at first. For
example, a script that is not needed until after the document is
parsed can be given the defer attribute (for browsers that support
defer).

External css can also be a blocking download. Scripts have defer
attribute, but style and link do not.

The proposal is to add to defer to style, and link.

This will allow browsers to not block on those elements.

It would be more complete to have a depends attribute on script and style.

<script depends="a b c"></script>

Where the depends is id-list [CS], space separated values of element IDs.

It would also be useful to have a way to dynamically load scripts,
other than createElement("script").

Garrett

Received on Sunday, 8 February 2009 21:15:36 UTC