tc39 / proposal-dynamic-import

import() proposal for JavaScript

Home Page:https://tc39.github.io/proposal-dynamic-import/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Needs cancellation

benlesh opened this issue · comments

The main use case I can think of for this is an instance where a component is dynamically added to a view, (classic framework route changes, for example) and the user then does something to cause the component to be removed (hits another route maybe) before the module is done arriving over the network. Ideally, we'd be able to prevent the script from being parsed if we no longer care about it anymore.

Sorry to pick at a wound. But I'm hoping you'll track this. I think import should have cancellation, (a promise is fine, just as long as we can cancel it somehow).

Cancelation is indeed an interesting thing for someone to work on. It's not part of this proposal, though, so I'll close this issue. If you're interested in making your own TC39 proposal, there's the whole stage process to go through.

If you're interested in making your own TC39 proposal

No way... haha. Too scared. :)

I'm wondering why

cancelation is not part of this proposal

It's a part of lifecycle when you want to request some resources.