?
u
/
p
1-9
0
`
See the explainer for information.
This proposal is buit on top of the JSON Modules and Immutable Array Buffer proposals.
The
An example of when referrer can be a
<button type="button" onclick="import('./foo.mjs')">Click me</button>
there will be no import()
An implementation of HostLoadImportedModule must conform to the following requirements:
If this operation is called multiple times with two (referrer, moduleRequest) pairs such that:
then it must perform
If moduleRequest.[[Attributes]] has an entry entry such that entry.[[Key]] is
If moduleRequest.[[Attributes]] has an entry entry such that entry.[[Key]] is
Let type be entry.[[Value]].
If type is
If type is
The actual process performed is
The above text implies that type: "json"
and type: "buffer"
respectively (if it completes normally), but it doesn't prohibit with { type: "json" }
, and environments which want to restrict themselves to a compatible subset would do so as well.
All of the import statements in the module graph that address the same JSON or buffer module may evaluate to the same mutable object.
A Synthetic Module Record is used to represent information about a module that is defined by specifications. Its exports are derived from a pair of lists, of string keys and of ECMAScript values. The set of exported names is static, and determined at creation time (as an argument to CreateSyntheticModule), while the set of exported values can be changed over time using
In addition to the fields defined in
Field Name | Value Type | Meaning |
---|---|---|
[[ExportNames]] | A |
|
[[EvaluationSteps]] | An |
An |
The abstract operation CreateBufferModule takes argument arrayBuffer (an immutable ArrayBuffer or a SharedArrayBuffer) and returns a
© 2025 Steven, Guy Bedford
All Software contained in this document ("Software") is protected by copyright and is being made available under the "BSD License", included below. This Software may be subject to third party rights (rights from parties other than Ecma International), including patent rights, and no licenses under such third party rights are granted under this license even if the third party concerned is a member of Ecma International. SEE THE ECMA CODE OF CONDUCT IN PATENT MATTERS AVAILABLE AT https://ecma-international.org/memento/codeofconduct.htm FOR INFORMATION REGARDING THE LICENSING OF PATENT CLAIMS THAT ARE REQUIRED TO IMPLEMENT ECMA INTERNATIONAL STANDARDS.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE ECMA INTERNATIONAL "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ECMA INTERNATIONAL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.