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

Re: [whatwg] Promise-vending loaded() & ready() methods on various elements

From: Jake Archibald <jaffathecake@gmail.com>
Date: Sat, 15 Mar 2014 16:55:29 +0000
Message-ID: <CAJ5xic9oMtaSO+fD=2naV9SWCO5sMPA5XL8Liv5oZ3OimNivsg@mail.gmail.com>
To: Kyle Simpson <getify@gmail.com>
Cc: "whatwg@lists.whatwg.org" <whatwg@lists.whatwg.org>
On 15 March 2014 15:51, Kyle Simpson <getify@gmail.com> wrote:

> But there was … suggestions about markup-only mechanisms for handling …
> the use-cases in a way that … eliminate any need for script loaders.
>

Yep, markup is important for preparsers. <module>/<script type="module"> &
ES6 modules give us a solution for the future.


> If we are … ready to set that requirement aside, and admit that markup
> capabilities (<link rel=preload> and <script>) are for the straight linear
> a->b->c use-cases
>

They're not. <link rel=preload> is for preloading assets, <script> is for
loading & executing. If you mix promises in you can load & execute in
whatever order you want, linear or not.


> and that the more sophisticated use-cases … require logic that belongs in
> some form of "script loader"
>

Yep, ES6 have a handle on that, with markup & code. For legacy non-module
content, you can do what you want with preloading and promises.
Received on Saturday, 15 March 2014 16:55:54 UTC

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