W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2009

[whatwg] Link.onload

From: Jonas Sicking <jonas@sicking.cc>
Date: Sat, 14 Mar 2009 18:54:35 -0700
Message-ID: <63df84f0903141854q29a9c7c8o8018bc858fb78468@mail.gmail.com>
On Sat, Mar 14, 2009 at 1:48 PM, Greg Houston <gregory.houston at gmail.com> wrote:
> This is a request for the link element to be given an onload attribute.
>
> Often when lazy loading a plugin into an web app it is necessary for
> the plugin's stylesheets to be applied before the plugin's JavaScript
> is downloaded. Without the link element having an onload event there
> is not really a straightforward way of doing this.

This sounds like a good idea to me. Seems useful for dynamically added
stylesheets too, and possibly for stylesheets where the href attribute
is dynamically changed.

Same thing goes for the <style> element since an inline stylesheet can
have @import rules.

Garrett: Whatever we decide when it comes to the defer attribute, it
is always useful to have scripting APIs as well. There is just no way
that you can cover all use cases declaratively, so it's useful to be
able to fall back to using scripting for cases not covered.

/ Jonas
Received on Saturday, 14 March 2009 18:54:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:47:49 GMT