[2] Webブラウザーは、
referencing と指定子に関する
HostResolveImportedModule
を、次のようにしなければなりません >>1。
[13] つまり、与えられたモジュール指定子を解決して得られた URL が、既に読み込み済みのモジュールスクリプトの URL であれば、 そのモジュールスクリプトが使われます。
[8] Webブラウザーは、
referencing と指定子、 promiseCapability に関する
HostImportModuleDynamically
を、次のようにしなければなりません。 >>1
null
の場合、FinishDynamicImport
を実行します。FinishDynamicImport
を実行します。[14] Handle error cases during module script tree fetching/running better (domenic著, ) https://github.com/whatwg/html/commit/e1af86747f591e33fd0f3f21f301dc866868c9d4
[17] Fix bad assert in HostResolveImportedModule (domenic著, ) https://github.com/whatwg/html/commit/e7041402890076aaf7095a3f8931ba0a00393b72
[18] Fix error cases of <script type=module> (domenic著, ) https://github.com/whatwg/html/commit/115763124a641e8814665c5014d28155f95ff441
[19] Don't handle impossible errors in HostResolveImportedModule (domenic著, ) https://github.com/whatwg/html/commit/616df18cd9e6c17878db5167909c69ca9f9d2906
[7] Improve module instantiation/evaluation, especially around errors (domenic著, ) https://github.com/whatwg/html/commit/2b408b65a11fe76b6588b744e0ae74d30ff29b43
[6] Integrate dynamic import() (domenic著, ) https://github.com/whatwg/html/commit/d4d1704f9c0efbeed78b885d566af17545b8b5fe
[35] Spec import() HTML integration · Issue #2315 · whatwg/html () https://github.com/whatwg/html/issues/2315
[36] Add integrity="" for module scripts, and integrate dynamic import() by domenic · Pull Request #3044 · whatwg/html () https://github.com/whatwg/html/pull/3044
[37] Specify which settings object is used for dynamic import (nhiroki著, ) https://github.com/whatwg/html/commit/07ab5082c326a0548b5d7665ac1524f1fa9e2818
[38] Specify which settings object is used for dynamic import by nhiroki · Pull Request #3700 · whatwg/html () https://github.com/whatwg/html/pull/3700
[39] Peeling out import() · Issue #149 · whatwg/loader () https://github.com/whatwg/loader/issues/149
This repository contains a proposal for adding a "function-like" import() module loading syntactic form to JavaScript. It is currently in stage 3 of the TC39 process. Previously it was discussed with the module-loading community in whatwg/loader#149.
[41] import() () https://tc39.github.io/proposal-dynamic-import/
[42] proposal-dynamic-import/HTML Integration.md at master · tc39/proposal-dynamic-import () https://github.com/tc39/proposal-dynamic-import/blob/master/HTML%20Integration.md
[43] Discussion: Towards a module map proposal · Issue #2547 · whatwg/html () https://github.com/whatwg/html/issues/2547
[44] Editorial: refactor classic and module scripts to be more alike (domenic著, ) https://github.com/whatwg/html/commit/dce999aac4d9deeefa3b338dd2aeb30c17669bc8
[45] Editorial: move base URL from "module script" to "script" (domenic著, ) https://github.com/whatwg/html/commit/5458513792ab00d58e6c91ba48faaa611d034a2e
[46] Add integrity="" for module scripts, and integrate dynamic import() by domenic · Pull Request #3044 · whatwg/html () https://github.com/whatwg/html/pull/3044
[47] Make integrity="" work on module scripts (domenic著, ) https://github.com/whatwg/html/commit/9275d955dcd604e959cfcc672e0c234b1b8c00db
[48] Integrate dynamic import() (domenic著, ) https://github.com/whatwg/html/commit/d4d1704f9c0efbeed78b885d566af17545b8b5fe
[49] Adds "audioworklet" and "paintworklet" as destinations. by bfgeek · Pull Request #527 · whatwg/fetch () https://github.com/whatwg/fetch/pull/527
[50] Dynamic import() | Web | Google Developers () https://developers.google.com/web/updates/2017/11/dynamic-import
[51] Peeling out import() · Issue #149 · whatwg/loader () https://github.com/whatwg/loader/issues/149
[52] New in Chrome 63 | Web | Google Developers () https://developers.google.com/web/updates/2017/12/nic63?utm_source=feed&utm_medium=feed&utm_campaign
[53] Fix import() inside setTimeout()/setInterval() strings (domenic著, ) https://github.com/whatwg/html/commit/12cdfefad607fc824e6ea64a4b967fc24043f684
[54] setTimeout() base URL/script fetch options behavior seems wrong · Issue #3116 · whatwg/html () https://github.com/whatwg/html/issues/3116
[55] Fix import() inside setTimeout()/setInterval() strings by domenic · Pull Request #3117 · whatwg/html () https://github.com/whatwg/html/pull/3117
[56] DOM handler and import · Issue #32 · tc39/proposal-dynamic-import () https://github.com/tc39/proposal-dynamic-import/issues/32
[57] 今まで JavaScript API の URL は原則的に文書の基底URL
を使っていたので、その原則が崩れてしまうのは微妙。
でも外部スクリプトファイルの import
が自身の URL
じゃなくて使っている文書の基底URLを使うようになると、
この上なく使いにくくなりそうだ。じゃあ import()
もそれと一貫してほしいってことになるのは自然。
[58] eval "import()"
と setTimeout ("import()", ...)
は含まれているスクリプトファイルの基底URLを引き継ぐ。
element.onclick = function () { import () }
もそう。一方
element.setAttribute ("onclick", "import()")
は文書の基底URLになる、のかな。
でもWebブラウザーが発火させるより前に
element.onclick
にアクセスしたら、その時点でコンパイルされるけど、
どうなるのか。
[59] Editorial: change "resolve a module specifier" to take a URL (domfarolino著, ) https://github.com/whatwg/html/commit/8176d055eaef62cad03327a7cc47c5c7926ffb0c
[60] Resolve a module specifier now takes a base URL by domfarolino · Pull Request #3807 · whatwg/html () https://github.com/whatwg/html/pull/3807
[34] Do not run FinishDynamicImport steps in parallel (domenic著, ) https://github.com/whatwg/html/commit/4ee44da9eb0f94bfa77001e8bcf16ede6050630e
[61] Do not run FinishDynamicImport steps in parallel by domenic · Pull Request #4182 · whatwg/html () https://github.com/whatwg/html/pull/4182
[62] Dev edition: improve the "Scripting" subsection (domenic著, ) https://github.com/whatwg/html/commit/ebdd2a03de44c6a51e837dbb2dbe6400d8bc6b40
[63] Dev edition: improve the "Scripting" subsection by domenic · Pull Request #4183 · whatwg/html () https://github.com/whatwg/html/pull/4183
[64] Always set [[ScriptOrModule]] to null for event handler functions (domenic著, ) https://github.com/whatwg/html/commit/1d6eb9933701ea65f7a9dd670d37a2faa17b8f12
[65] import() behaviour in event handlers is path dependent · Issue #4267 · whatwg/html () https://github.com/whatwg/html/issues/4267
[66] Handle module resolution when there is no active script by domenic · Pull Request #4181 · whatwg/html () https://github.com/whatwg/html/pull/4181
[67] Always set [[ScriptOrModule]] to null for event handler functions by domenic · Pull Request #4302 · whatwg/html () https://github.com/whatwg/html/pull/4302
[68] Editorial: update some JavaScript spec references (domenic著, ) https://github.com/whatwg/html/commit/6227b7e91913d21157a1265f6e294a7a89f916c4
import
で使われます。