Re: [whatwg] Fetch Objects and scripts/stylesheets

On Wed, Jul 23, 2014 at 2:33 AM, Ian Hickson <ian@hixie.ch> wrote:
> Why not:
>
>    var mystyle = E('link', { rel: 'stylesheet', href: 'my.css', whenneeded: true });
>    document.body.appendChild(mystyle);
>    var myfetch = mystyle.fetch;
>    ...
>
> ...where "E()" is some mechanism to easily create new elements (we need
> one of those regardless), and "whenneeded" is some attribute that controls
> the load policy (and in this case, tells it to not load yet, since I
> presume that's what you're going to do next with the "myfetch" variable)?

Because that does not give you access to the additional parameters of
Fetch: http://fetch.spec.whatwg.org/#requestinit (And this will grow
with parameters such as omitReferrer.)

(Sorry for the multiple replies to different points in your email.)


-- 
http://annevankesteren.nl/

Received on Monday, 28 July 2014 07:58:22 UTC