- From: Dominic Cooney <dominicc@google.com>
- Date: Thu, 16 Apr 2015 14:09:39 +0900
- To: Travis Leithead <travis.leithead@microsoft.com>
- Cc: WebApps WG <public-webapps@w3.org>
Received on Thursday, 16 April 2015 05:10:07 UTC
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. Dominic
Received on Thursday, 16 April 2015 05:10:07 UTC