Closed falsandtru closed 7 years ago
@falsandtru this issue belongs to tc39/proposal-dynamic-import or maybe whatwg directly (since this is a behavior specified by the host environment). I also noticed that you have open the issue there, and closed it in favor of this one, not sure why.
After url and dom are changed by SPA or PJAX, requested scripts must NOT be evaluated. So importing must have failed if url has changed.
If it is not a module script, we can cancel the evaluation of that. But if it is a module script, we cannot cancel the evaluation of that.
Here is my code having this problem.
https://github.com/falsandtru/pjax-api/blob/ae05475a829974d634b46ac346939a599c90545b/src/layer/domain/router/module/update/script.ts#L123-L152