[whatwg] Script preloading

Garrett Smith dhtmlkitchen at gmail.com
Fri Aug 30 16:36:38 PDT 2013

On 8/30/13, Ryosuke Niwa <rniwa at apple.com> wrote:
> On Aug 30, 2013, at 9:08 AM, Yoav Weiss <yoav at yoav.ws> wrote:
>> On Tue, Aug 27, 2013 at 11:55 PM, Ian Hickson <ian at hixie.ch> wrote:
>>> On Thu, 11 Jul 2013, Yoav Weiss wrote:

>> They are fairly common, especially for loading of "mobile" UI components
>> (e.g. jquery mobile). They can also be used to download dynamic page
>> components (e.g. maps) only on larger devices.
>> But, unless adding `media` to script elements is relatively simple, I
>> think
>> that this use-case can be resolved by using the media attribute on <rel
>> subresource>, in combination with ES6 modules or a custom script loader.
>> As
>> far as I understand it, all <link> elements can have a media attribute
>> [1],
>> so this is simply an implementation issue.
> I don't think it'll be hard to add the media attribute on the script element
> at least in WebKit.
> It'll be much harder to implement a new dependency API that replies on CSS
> selectors if we care about the performance at all.
What is this in response to? What dependency API that relies on CSS
selectors? (I'm assuming you mean relies and not replies, but still
not sure what you mean).
Twitter: @xkit

More information about the whatwg mailing list