- From: ??? <willchan@chromium.org>
- Date: Mon, 28 Jul 2014 10:34:16 -0700
- To: Anne van Kesteren <annevk@annevk.nl>
- Cc: "whatwg@lists.whatwg.org" <whatwg@lists.whatwg.org>, Boris Zbarsky <bzbarsky@mit.edu>, Ian Hickson <ian@hixie.ch>, Ben Maurer <ben.maurer@gmail.com>
On Mon, Jul 28, 2014 at 10:14 AM, Anne van Kesteren <annevk@annevk.nl> wrote: > On Mon, Jul 28, 2014 at 7:07 PM, Ian Hickson <ian@hixie.ch> wrote: > > On Mon, 28 Jul 2014, Anne van Kesteren wrote: > >> On Wed, Jul 23, 2014 at 2:33 AM, Ian Hickson <ian@hixie.ch> wrote: > >>> 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)? > > Apologies for missing myfetch. That could work potentially. Not > entirely sure what kind of object it would return, but I guess we can > think of something. > Yep, this is roughly what I had in mind. The way Ian describes it is the imperative interface, but I assume element.fetch would be exposed for any DOM element with an associated resource request, not just DOM elements created via E(). If so, SGTM. > > > -- > http://annevankesteren.nl/ >
Received on Monday, 28 July 2014 17:34:41 UTC