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

Re: [Imports] Considering imperative HTML imports?

From: Elliott Sprehn <esprehn@chromium.org>
Date: Thu, 16 Apr 2015 00:55:24 -0700
Message-ID: <CAO9Q3i+szfTPdRTUfWCJYWOzVfngKi4hoHaZ1qt2-zYWFEbe0g@mail.gmail.com>
To: Travis Leithead <travis.leithead@microsoft.com>
Cc: WebApps WG <public-webapps@w3.org>
On Wed, Apr 15, 2015 at 9: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.
>

We did consider this, I think there's still a proposal for an imperative
document.import(url) => Promise API. The major advantage of the declarative
approach is that the browser can fetch the entire import tree and even
start tokenizing on a background thread without ever running any script.

- E
Received on Thursday, 16 April 2015 07:56:33 UTC

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