- From: Russell Bicknell <notifications@github.com>
- Date: Sat, 24 Jun 2017 03:23:02 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Saturday, 24 June 2017 10:23:34 UTC
Oh, maybe this would be even better if the function produced a promise for a module record. Then, your importer wouldn't have to be sync and could handle loading that resource's dependencies, if any, and would mirror [`import()`](https://github.com/tc39/proposal-dynamic-import) nicely. This: ```js assert(png[Symbol.importer](someArrayBuffer).default instanceof Image); ``` would instead be this ```js png[Symbol.importer](someArrayBuffer).then(m => assert(m.default instanceof Image)); ``` which feels just like this ```js import(someUrl).then(m => /* do stuff */); ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/webcomponents/issues/645#issuecomment-310830269
Received on Saturday, 24 June 2017 10:23:34 UTC