W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2015

Re: [Imports] Considering imperative HTML imports?

From: Dominic Cooney <dominicc@google.com>
Date: Thu, 16 Apr 2015 14:09:39 +0900
Message-ID: <CAHnmYQ-hO=Y-y=J3zVQY9BEyP3TRuoo3Bi+QRJABp2XPPQVX=w@mail.gmail.com>
To: Travis Leithead <travis.leithead@microsoft.com>
Cc: WebApps WG <public-webapps@w3.org>
On Thu, Apr 16, 2015 at 1:37 PM, Travis Leithead <
travis.leithead@microsoft.com> wrote:

>  Was an imperative form of HTML imports already considered? E.g., the
> following springs to mind:
>   Promise<Document> importDocument(DOMString url);
> I was thinking about Worker’s importScripts(DOMString… urls), and the
> above seems like a nice related corollary.

One big difference, I'm assuming, is whether it's asynchronous. Returning a
Promise kind of implies that importDocument may be/is asynchronous.

The trend seems to be away from adding synchronous APIs, but then you can't
express <link rel="import" src="..."> (ie no 'async') using this API. I
think the declarative, script-blocking element is more palatable than a
synchronous method because the UA can process it when there's no user
script running.

Received on Thursday, 16 April 2015 05:10:07 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:27:31 UTC