W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2014

Re: [whatwg] Fetch Objects and scripts/stylesheets

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 22 Jul 2014 22:05:17 -0400
Message-ID: <53CF185D.5050006@mit.edu>
To: Ben Maurer <ben.maurer@gmail.com>, "William Chan (ι™ˆζ™Ίζ˜Œ)" <willchan@chromium.org>
Cc: "whatwg@lists.whatwg.org" <whatwg@lists.whatwg.org>
On 7/22/14, 7:07 PM, Ben Maurer wrote:
> var myfetch = window.fetch('my.css', {'fetch-as': 'stylesheet'});
> myfetch.then(function(resp) {
>    document.body.appendChild(resp.body.asStyleSheet());
> });
>
> Boris, Will -- would this setup address the concerns you have about the
> problems websites that use XHR to load resources encounter?

It would.  So would some API on top of fetch (as Domenic and Ian propose).

-Boris
Received on Wednesday, 23 July 2014 02:05:46 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:21 UTC