Re:Top-level await in JavaScript is a footgun
by rich_harris on Wednesday September 14, 2016 @03:29PM
(#12500431)
When I tried to ask you about this stuff on Twitter the other day, this was your dismissive response: https://twitter.com/domenic/status/774762508091551745
Speculative fetching is possible in HTML because <link> and <img> and <script> tags etc are declarative. Similarly, modules can be fetched without the code executing because `import` is declarative. How can a browser prefetch modules when it encounters an imperative statement like `x = await import(computedModuleId())` without actually running the code?
Yes, that is indeed what I am referring to, as engines already do for HTML.