blob: c8b1b7997758619ea710f05c32584d664b299bac [file] [log] [blame] [edit]
<!doctype html><html lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
<title>WebAssembly JavaScript Interface: Exception Handling</title>
<meta content="ED" name="w3c-status">
<meta content="Bikeshed version 3f621ba99, updated Mon Jul 28 15:38:36 2025 -0700" name="generator">
<link href="https://www.w3.org/TR/wasm-js-api-2/" rel="canonical">
<meta content="9d36019973201a19f9c9ebb0f10828b2fe2374aa" name="revision">
<meta content="dark light" name="color-scheme">
<style>
emu-const {
font-family: serif;
}
</style>
<style>/* Boilerplate: style-autolinks */
.css.css, .property.property, .descriptor.descriptor {
color: var(--a-normal-text);
font-size: inherit;
font-family: inherit;
}
.css::before, .property::before, .descriptor::before {
content: "‘";
}
.css::after, .property::after, .descriptor::after {
content: "’";
}
.property, .descriptor {
/* Don't wrap property and descriptor names */
white-space: nowrap;
}
.type { /* CSS value <type> */
font-style: italic;
}
pre .property::before, pre .property::after {
content: "";
}
[data-link-type="property"]::before,
[data-link-type="propdesc"]::before,
[data-link-type="descriptor"]::before,
[data-link-type="value"]::before,
[data-link-type="function"]::before,
[data-link-type="at-rule"]::before,
[data-link-type="selector"]::before,
[data-link-type="maybe"]::before {
content: "‘";
}
[data-link-type="property"]::after,
[data-link-type="propdesc"]::after,
[data-link-type="descriptor"]::after,
[data-link-type="value"]::after,
[data-link-type="function"]::after,
[data-link-type="at-rule"]::after,
[data-link-type="selector"]::after,
[data-link-type="maybe"]::after {
content: "’";
}
[data-link-type].production::before,
[data-link-type].production::after,
.prod [data-link-type]::before,
.prod [data-link-type]::after {
content: "";
}
[data-link-type=element],
[data-link-type=element-attr] {
font-family: Menlo, Consolas, "DejaVu Sans Mono", monospace;
font-size: .9em;
}
[data-link-type=element]::before { content: "<" }
[data-link-type=element]::after { content: ">" }
[data-link-type=biblio] {
white-space: pre;
}
@media (prefers-color-scheme: dark) {
:root {
--selflink-text: black;
--selflink-bg: silver;
--selflink-hover-text: white;
}
}
</style>
<style>/* Boilerplate: style-colors */
/* Any --*-text not paired with a --*-bg is assumed to have a transparent bg */
:root {
color-scheme: light dark;
--text: black;
--bg: white;
--unofficial-watermark: url(https://www.w3.org/StyleSheets/TR/2016/logos/UD-watermark);
--logo-bg: #1a5e9a;
--logo-active-bg: #c00;
--logo-text: white;
--tocnav-normal-text: #707070;
--tocnav-normal-bg: var(--bg);
--tocnav-hover-text: var(--tocnav-normal-text);
--tocnav-hover-bg: #f8f8f8;
--tocnav-active-text: #c00;
--tocnav-active-bg: var(--tocnav-normal-bg);
--tocsidebar-text: var(--text);
--tocsidebar-bg: #f7f8f9;
--tocsidebar-shadow: rgba(0,0,0,.1);
--tocsidebar-heading-text: hsla(203,20%,40%,.7);
--toclink-text: var(--text);
--toclink-underline: #3980b5;
--toclink-visited-text: var(--toclink-text);
--toclink-visited-underline: #054572;
--heading-text: #005a9c;
--hr-text: var(--text);
--algo-border: #def;
--del-text: red;
--del-bg: transparent;
--ins-text: #080;
--ins-bg: transparent;
--a-normal-text: #034575;
--a-normal-underline: #bbb;
--a-visited-text: var(--a-normal-text);
--a-visited-underline: #707070;
--a-hover-bg: rgba(75%, 75%, 75%, .25);
--a-active-text: #c00;
--a-active-underline: #c00;
--blockquote-border: silver;
--blockquote-bg: transparent;
--blockquote-text: currentcolor;
--issue-border: #e05252;
--issue-bg: #fbe9e9;
--issue-text: var(--text);
--issueheading-text: #831616;
--example-border: #e0cb52;
--example-bg: #fcfaee;
--example-text: var(--text);
--exampleheading-text: #574b0f;
--note-border: #52e052;
--note-bg: #e9fbe9;
--note-text: var(--text);
--noteheading-text: hsl(120, 70%, 30%);
--notesummary-underline: silver;
--assertion-border: #aaa;
--assertion-bg: #eee;
--assertion-text: black;
--advisement-border: orange;
--advisement-bg: #fec;
--advisement-text: var(--text);
--advisementheading-text: #b35f00;
--warning-border: red;
--warning-bg: hsla(40,100%,50%,0.95);
--warning-text: var(--text);
--amendment-border: #330099;
--amendment-bg: #F5F0FF;
--amendment-text: var(--text);
--amendmentheading-text: #220066;
--def-border: #8ccbf2;
--def-bg: #def;
--def-text: var(--text);
--defrow-border: #bbd7e9;
--datacell-border: silver;
--indexinfo-text: #707070;
--indextable-hover-text: black;
--indextable-hover-bg: #f7f8f9;
--outdatedspec-bg: rgba(0, 0, 0, .5);
--outdatedspec-text: black;
--outdated-bg: maroon;
--outdated-text: white;
--outdated-shadow: red;
--editedrec-bg: darkorange;
}
@media (prefers-color-scheme: dark) {
:root {
--text: #ddd;
--bg: black;
--unofficial-watermark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cg fill='%23100808' transform='translate(200 200) rotate(-45) translate(-200 -200)' stroke='%23100808' stroke-width='3'%3E%3Ctext x='50%25' y='220' style='font: bold 70px sans-serif; text-anchor: middle; letter-spacing: 6px;'%3EUNOFFICIAL%3C/text%3E%3Ctext x='50%25' y='305' style='font: bold 70px sans-serif; text-anchor: middle; letter-spacing: 6px;'%3EDRAFT%3C/text%3E%3C/g%3E%3C/svg%3E");
--logo-bg: #1a5e9a;
--logo-active-bg: #c00;
--logo-text: white;
--tocnav-normal-text: #999;
--tocnav-normal-bg: var(--bg);
--tocnav-hover-text: var(--tocnav-normal-text);
--tocnav-hover-bg: #080808;
--tocnav-active-text: #f44;
--tocnav-active-bg: var(--tocnav-normal-bg);
--tocsidebar-text: var(--text);
--tocsidebar-bg: #080808;
--tocsidebar-shadow: rgba(255,255,255,.1);
--tocsidebar-heading-text: hsla(203,20%,40%,.7);
--toclink-text: var(--text);
--toclink-underline: #6af;
--toclink-visited-text: var(--toclink-text);
--toclink-visited-underline: #054572;
--heading-text: #8af;
--hr-text: var(--text);
--algo-border: #456;
--del-text: #f44;
--del-bg: transparent;
--ins-text: #4a4;
--ins-bg: transparent;
--a-normal-text: #6af;
--a-normal-underline: #555;
--a-visited-text: var(--a-normal-text);
--a-visited-underline: var(--a-normal-underline);
--a-hover-bg: rgba(25%, 25%, 25%, .2);
--a-active-text: #f44;
--a-active-underline: var(--a-active-text);
--borderedblock-bg: rgba(255, 255, 255, .05);
--blockquote-border: silver;
--blockquote-bg: var(--borderedblock-bg);
--blockquote-text: currentcolor;
--issue-border: #e05252;
--issue-bg: var(--borderedblock-bg);
--issue-text: var(--text);
--issueheading-text: hsl(0deg, 70%, 70%);
--example-border: hsl(50deg, 90%, 60%);
--example-bg: var(--borderedblock-bg);
--example-text: var(--text);
--exampleheading-text: hsl(50deg, 70%, 70%);
--note-border: hsl(120deg, 100%, 35%);
--note-bg: var(--borderedblock-bg);
--note-text: var(--text);
--noteheading-text: hsl(120, 70%, 70%);
--notesummary-underline: silver;
--assertion-border: #444;
--assertion-bg: var(--borderedblock-bg);
--assertion-text: var(--text);
--advisement-border: orange;
--advisement-bg: #222218;
--advisement-text: var(--text);
--advisementheading-text: #f84;
--warning-border: red;
--warning-bg: hsla(40,100%,20%,0.95);
--warning-text: var(--text);
--amendment-border: #330099;
--amendment-bg: #080010;
--amendment-text: var(--text);
--amendmentheading-text: #cc00ff;
--def-border: #8ccbf2;
--def-bg: #080818;
--def-text: var(--text);
--defrow-border: #136;
--datacell-border: silver;
--indexinfo-text: #aaa;
--indextable-hover-text: var(--text);
--indextable-hover-bg: #181818;
--outdatedspec-bg: rgba(255, 255, 255, .5);
--outdatedspec-text: black;
--outdated-bg: maroon;
--outdated-text: white;
--outdated-shadow: red;
--editedrec-bg: darkorange;
}
/* In case a transparent-bg image doesn't expect to be on a dark bg,
which is quite common in practice... */
img { background: white; }
}
</style>
<style>/* Boilerplate: style-counters */
body {
counter-reset: example figure issue;
}
.issue {
counter-increment: issue;
}
.issue:not(.no-marker)::before {
content: "Issue " counter(issue);
}
.example {
counter-increment: example;
}
.example:not(.no-marker)::before {
content: "Example " counter(example);
}
.invalid.example:not(.no-marker)::before,
.illegal.example:not(.no-marker)::before {
content: "Invalid Example" counter(example);
}
figcaption {
counter-increment: figure;
}
figcaption:not(.no-marker)::before {
content: "Figure " counter(figure) " ";
}
</style>
<style>/* Boilerplate: style-dfn-panel */
:root {
--dfnpanel-bg: #ddd;
--dfnpanel-text: var(--text);
--dfnpanel-target-bg: #ffc;
--dfnpanel-target-outline: orange;
}
@media (prefers-color-scheme: dark) {
:root {
--dfnpanel-bg: #222;
--dfnpanel-text: var(--text);
--dfnpanel-target-bg: #333;
--dfnpanel-target-outline: silver;
}
}
.dfn-panel {
position: absolute;
z-index: 35;
width: 20em;
width: 300px;
height: auto;
max-height: 500px;
overflow: auto;
padding: 0.5em 0.75em;
font: small Helvetica Neue, sans-serif, Droid Sans Fallback;
background: var(--dfnpanel-bg);
color: var(--dfnpanel-text);
border: outset 0.2em;
white-space: normal; /* in case it's moved into a pre */
}
.dfn-panel:not(.on) { display: none; }
.dfn-panel * { margin: 0; padding: 0; text-indent: 0; }
.dfn-panel > b { display: block; }
.dfn-panel a { color: var(--dfnpanel-text); }
.dfn-panel a:not(:hover) { text-decoration: none !important; border-bottom: none !important; }
.dfn-panel a:focus {
outline: 5px auto Highlight;
outline: 5px auto -webkit-focus-ring-color;
}
.dfn-panel > b + b { margin-top: 0.25em; }
.dfn-panel ul { padding: 0 0 0 1em; list-style: none; }
.dfn-panel li a {
max-width: calc(300px - 1.5em - 1em);
overflow: hidden;
text-overflow: ellipsis;
}
.dfn-panel.activated {
display: inline-block;
position: fixed;
left: 8px;
bottom: 2em;
margin: 0 auto;
max-width: calc(100vw - 1.5em - .4em - .5em);
max-height: 30vh;
transition: left 1s ease-out, bottom 1s ease-out;
}
.dfn-panel .link-item:hover {
text-decoration: underline;
}
.dfn-panel .link-item .copy-icon {
opacity: 0;
}
.dfn-panel .link-item:hover .copy-icon,
.dfn-panel .link-item .copy-icon:focus {
opacity: 1;
}
.dfn-panel .copy-icon {
display: inline-block;
margin-right: 0.5em;
width: 0.85em;
height: 1em;
border-radius: 3px;
background-color: #ccc;
cursor: pointer;
}
.dfn-panel .copy-icon .icon {
width: 100%;
height: 100%;
background-color: #fff;
display: flex;
justify-content: center;
align-items: center;
position: relative;
}
.dfn-panel .copy-icon .icon::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: 1px solid black;
background-color: #ccc;
opacity: 0.25;
transform: translate(3px, -3px);
}
.dfn-panel .copy-icon:active .icon::before {
opacity: 1;
}
.dfn-paneled[role="button"] { cursor: help; }
.highlighted {
animation: target-fade 3s;
}
@keyframes target-fade {
from {
background-color: var(--dfnpanel-target-bg);
outline: 5px solid var(--dfnpanel-target-outline);
}
to {
color: var(--a-normal-text);
background-color: transparent;
outline: transparent;
}
}
</style>
<style>/* Boilerplate: style-idl-highlighting */
pre.idl.highlight {
background: var(--borderedblock-bg, var(--def-bg));
}
</style>
<style>/* Boilerplate: style-issues */
a[href].issue-return {
float: right;
float: inline-end;
color: var(--issueheading-text);
font-weight: bold;
text-decoration: none;
}
</style>
<style>/* Boilerplate: style-md-lists */
/* This is a weird hack for me not yet following the commonmark spec
regarding paragraph and lists. */
[data-md] > :first-child {
margin-top: 0;
}
[data-md] > :last-child {
margin-bottom: 0;
}
</style>
<style>/* Boilerplate: style-ref-hints */
:root {
--ref-hint-bg: #ddd;
--ref-hint-text: var(--text);
}
@media (prefers-color-scheme: dark) {
:root {
--ref-hint-bg: #222;
--ref-hint-text: var(--text);
}
}
.ref-hint {
display: inline-block;
position: absolute;
z-index: 35;
width: 20em;
width: 300px;
height: auto;
max-height: 500px;
overflow: auto;
padding: 0.5em 0.5em;
font: small Helvetica Neue, sans-serif, Droid Sans Fallback;
background: var(--ref-hint-bg);
color: var(--ref-hint-text);
border: outset 0.2em;
white-space: normal; /* in case it's moved into a pre */
}
.ref-hint * { margin: 0; padding: 0; text-indent: 0; }
.ref-hint ul { padding: 0 0 0 1em; list-style: none; }
</style>
<style>/* Boilerplate: style-selflinks */
:root {
--selflink-text: white;
--selflink-bg: gray;
--selflink-hover-text: black;
}
.heading, .issue, .note, .example, li, dt {
position: relative;
}
a.self-link {
position: absolute;
top: 0;
left: calc(-1 * (3.5rem - 26px));
width: calc(3.5rem - 26px);
height: 2em;
text-align: center;
border: none;
transition: opacity .2s;
opacity: .5;
}
a.self-link:hover {
opacity: 1;
}
.heading > a.self-link {
font-size: 83%;
}
.example > a.self-link,
.note > a.self-link,
.issue > a.self-link {
/* These blocks are overflow:auto, so positioning outside
doesn't work. */
left: auto;
right: 0;
}
li > a.self-link {
left: calc(-1 * (3.5rem - 26px) - 2em);
}
dfn > a.self-link {
top: auto;
left: auto;
opacity: 0;
width: 1.5em;
height: 1.5em;
background: var(--selflink-bg);
color: var(--selflink-text);
font-style: normal;
transition: opacity .2s, background-color .2s, color .2s;
}
dfn:hover > a.self-link {
opacity: 1;
}
dfn > a.self-link:hover {
color: var(--selflink-hover-text);
}
a.self-link::before { content: "¶"; }
.heading > a.self-link::before { content: "§"; }
dfn > a.self-link::before { content: "#"; }
</style>
<style>/* Boilerplate: style-syntax-highlighting */
code.highlight { padding: .1em; border-radius: .3em; }
pre.highlight, pre > code.highlight { display: block; padding: 1em; margin: .5em 0; overflow: auto; border-radius: 0; }
.highlight:not(.idl) { background: rgba(0, 0, 0, .03); }
c-[a] { color: #990055 } /* Keyword.Declaration */
c-[b] { color: #990055 } /* Keyword.Type */
c-[c] { color: #708090 } /* Comment */
c-[d] { color: #708090 } /* Comment.Multiline */
c-[e] { color: #0077aa } /* Name.Attribute */
c-[f] { color: #669900 } /* Name.Tag */
c-[g] { color: #222222 } /* Name.Variable */
c-[k] { color: #990055 } /* Keyword */
c-[l] { color: #000000 } /* Literal */
c-[m] { color: #000000 } /* Literal.Number */
c-[n] { color: #0077aa } /* Name */
c-[o] { color: #999999 } /* Operator */
c-[p] { color: #999999 } /* Punctuation */
c-[s] { color: #a67f59 } /* Literal.String */
c-[t] { color: #a67f59 } /* Literal.String.Single */
c-[u] { color: #a67f59 } /* Literal.String.Double */
c-[cp] { color: #708090 } /* Comment.Preproc */
c-[c1] { color: #708090 } /* Comment.Single */
c-[cs] { color: #708090 } /* Comment.Special */
c-[kc] { color: #990055 } /* Keyword.Constant */
c-[kn] { color: #990055 } /* Keyword.Namespace */
c-[kp] { color: #990055 } /* Keyword.Pseudo */
c-[kr] { color: #990055 } /* Keyword.Reserved */
c-[ld] { color: #000000 } /* Literal.Date */
c-[nc] { color: #0077aa } /* Name.Class */
c-[no] { color: #0077aa } /* Name.Constant */
c-[nd] { color: #0077aa } /* Name.Decorator */
c-[ni] { color: #0077aa } /* Name.Entity */
c-[ne] { color: #0077aa } /* Name.Exception */
c-[nf] { color: #0077aa } /* Name.Function */
c-[nl] { color: #0077aa } /* Name.Label */
c-[nn] { color: #0077aa } /* Name.Namespace */
c-[py] { color: #0077aa } /* Name.Property */
c-[ow] { color: #999999 } /* Operator.Word */
c-[mb] { color: #000000 } /* Literal.Number.Bin */
c-[mf] { color: #000000 } /* Literal.Number.Float */
c-[mh] { color: #000000 } /* Literal.Number.Hex */
c-[mi] { color: #000000 } /* Literal.Number.Integer */
c-[mo] { color: #000000 } /* Literal.Number.Oct */
c-[sb] { color: #a67f59 } /* Literal.String.Backtick */
c-[sc] { color: #a67f59 } /* Literal.String.Char */
c-[sd] { color: #a67f59 } /* Literal.String.Doc */
c-[se] { color: #a67f59 } /* Literal.String.Escape */
c-[sh] { color: #a67f59 } /* Literal.String.Heredoc */
c-[si] { color: #a67f59 } /* Literal.String.Interpol */
c-[sx] { color: #a67f59 } /* Literal.String.Other */
c-[sr] { color: #a67f59 } /* Literal.String.Regex */
c-[ss] { color: #a67f59 } /* Literal.String.Symbol */
c-[vc] { color: #0077aa } /* Name.Variable.Class */
c-[vg] { color: #0077aa } /* Name.Variable.Global */
c-[vi] { color: #0077aa } /* Name.Variable.Instance */
c-[il] { color: #000000 } /* Literal.Number.Integer.Long */
@media (prefers-color-scheme: dark) {
.highlight:not(.idl) { background: rgba(255, 255, 255, .05); }
c-[a] { color: #d33682 } /* Keyword.Declaration */
c-[b] { color: #d33682 } /* Keyword.Type */
c-[c] { color: #2aa198 } /* Comment */
c-[d] { color: #2aa198 } /* Comment.Multiline */
c-[e] { color: #268bd2 } /* Name.Attribute */
c-[f] { color: #b58900 } /* Name.Tag */
c-[g] { color: #cb4b16 } /* Name.Variable */
c-[k] { color: #d33682 } /* Keyword */
c-[l] { color: #657b83 } /* Literal */
c-[m] { color: #657b83 } /* Literal.Number */
c-[n] { color: #268bd2 } /* Name */
c-[o] { color: #657b83 } /* Operator */
c-[p] { color: #657b83 } /* Punctuation */
c-[s] { color: #6c71c4 } /* Literal.String */
c-[t] { color: #6c71c4 } /* Literal.String.Single */
c-[u] { color: #6c71c4 } /* Literal.String.Double */
c-[ch] { color: #2aa198 } /* Comment.Hashbang */
c-[cp] { color: #2aa198 } /* Comment.Preproc */
c-[cpf] { color: #2aa198 } /* Comment.PreprocFile */
c-[c1] { color: #2aa198 } /* Comment.Single */
c-[cs] { color: #2aa198 } /* Comment.Special */
c-[kc] { color: #d33682 } /* Keyword.Constant */
c-[kn] { color: #d33682 } /* Keyword.Namespace */
c-[kp] { color: #d33682 } /* Keyword.Pseudo */
c-[kr] { color: #d33682 } /* Keyword.Reserved */
c-[ld] { color: #657b83 } /* Literal.Date */
c-[nc] { color: #268bd2 } /* Name.Class */
c-[no] { color: #268bd2 } /* Name.Constant */
c-[nd] { color: #268bd2 } /* Name.Decorator */
c-[ni] { color: #268bd2 } /* Name.Entity */
c-[ne] { color: #268bd2 } /* Name.Exception */
c-[nf] { color: #268bd2 } /* Name.Function */
c-[nl] { color: #268bd2 } /* Name.Label */
c-[nn] { color: #268bd2 } /* Name.Namespace */
c-[py] { color: #268bd2 } /* Name.Property */
c-[ow] { color: #657b83 } /* Operator.Word */
c-[mb] { color: #657b83 } /* Literal.Number.Bin */
c-[mf] { color: #657b83 } /* Literal.Number.Float */
c-[mh] { color: #657b83 } /* Literal.Number.Hex */
c-[mi] { color: #657b83 } /* Literal.Number.Integer */
c-[mo] { color: #657b83 } /* Literal.Number.Oct */
c-[sa] { color: #6c71c4 } /* Literal.String.Affix */
c-[sb] { color: #6c71c4 } /* Literal.String.Backtick */
c-[sc] { color: #6c71c4 } /* Literal.String.Char */
c-[dl] { color: #6c71c4 } /* Literal.String.Delimiter */
c-[sd] { color: #6c71c4 } /* Literal.String.Doc */
c-[se] { color: #6c71c4 } /* Literal.String.Escape */
c-[sh] { color: #6c71c4 } /* Literal.String.Heredoc */
c-[si] { color: #6c71c4 } /* Literal.String.Interpol */
c-[sx] { color: #6c71c4 } /* Literal.String.Other */
c-[sr] { color: #6c71c4 } /* Literal.String.Regex */
c-[ss] { color: #6c71c4 } /* Literal.String.Symbol */
c-[fm] { color: #268bd2 } /* Name.Function.Magic */
c-[vc] { color: #cb4b16 } /* Name.Variable.Class */
c-[vg] { color: #cb4b16 } /* Name.Variable.Global */
c-[vi] { color: #cb4b16 } /* Name.Variable.Instance */
c-[vm] { color: #cb4b16 } /* Name.Variable.Magic */
c-[il] { color: #657b83 } /* Literal.Number.Integer.Long */
}
</style>
<style>/* Boilerplate: style-var-click-highlighting */
/*
Colors were chosen in Lab using https://nixsensor.com/free-color-converter/
D50 2deg illuminant, L in [0,100], a and b in [-128, 128]
0 = lab(85,0,85)
1 = lab(85,80,30)
2 = lab(85,-40,40)
3 = lab(85,-50,0)
4 = lab(85,5,15)
5 = lab(85,-10,-50)
6 = lab(85,35,-15)
For darkmode:
0 = oklab(50% 0% 108%)
1 = oklab(50% -51% 51%)
2 = oklab(50% -64% -20%)
3 = oklab(50% 6% 19%)
4 = oklab(50% -12% -64%)
5 = oklab(50% 44% -19%)
6 = oklab(50% 102% 38%)
*/
[data-algorithm] var { cursor: pointer; }
var[data-var-color] { background-color: var(--var-bg); box-shadow: 0 0 0 2px var(--var-bg); }
var[data-var-color] { --var-bg: #F4D200; }
var[data-var-color="1"] { --var-bg: #FF87A2; }
var[data-var-color="2"] { --var-bg: #96E885; }
var[data-var-color="3"] { --var-bg: #3EEED2; }
var[data-var-color="4"] { --var-bg: #EACFB6; }
var[data-var-color="5"] { --var-bg: #82DDFF; }
var[data-var-color="6"] { --var-vg: #FFBCF2; }
@media (prefers-color-scheme: dark) {
var[data-var-color] { --var-bg: #bc1a00; }
var[data-var-color="1"] { --var-bg: #007f00; }
var[data-var-color="2"] { --var-bg: #008698; }
var[data-var-color="3"] { --var-bg: #7f5b2b; }
var[data-var-color="4"] { --var-bg: #004df3; }
var[data-var-color="5"] { --var-bg: #a1248a; }
var[data-var-color="6"] { --var-vg: #ff0000; }
}
</style>
<link href="https://www.w3.org/StyleSheets/TR/2021/W3C-ED" rel="stylesheet">
<link href="https://www.w3.org/StyleSheets/TR/2021/dark.css" media="(prefers-color-scheme: dark)" rel="stylesheet" type="text/css">
<body class="h-entry">
<div class="head">
<p data-fill-with="logo"><a class="logo" href="https://www.w3.org/">
<img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2021/logos/W3C" width="72">
</a>
</p>
<h1 class="p-name no-ref" id="title">WebAssembly JavaScript Interface: Exception Handling</h1>
<p id="w3c-state"><a href="https://www.w3.org/standards/types/#ED">Editor’s Draft</a>,
<time class="dt-updated" datetime="2025-09-26">26 September 2025</time></p>
<details open>
<summary>More details about this document</summary>
<div data-fill-with="spec-metadata">
<dl>
<dt>This version:
<dd><a class="u-url" href="https://webassembly.github.io/exception-handling/js-api/">https://webassembly.github.io/exception-handling/js-api/</a>
<dt>Latest published version:
<dd><a href="https://www.w3.org/TR/wasm-js-api-2/">https://www.w3.org/TR/wasm-js-api-2/</a>
<dt>Feedback:
<dd><a href="#issues-index">Inline In Spec</a>
<dt class="editor">Editor:
<dd class="editor p-author h-card vcard"><span class="p-name fn">Ms2ger</span> (<span class="p-org org">Igalia</span>)
<dt>Issue Tracking:
<dd><a href="https://github.com/WebAssembly/spec/labels/wasm-js-api-2">GitHub Issues</a>
</dl>
</div>
</details>
<div data-fill-with="warning"></div>
<p class="copyright" data-fill-with="copyright"><a href="https://www.w3.org/policies/#copyright">Copyright</a> © 2025 <a href="https://www.w3.org/">World Wide Web Consortium</a>. <abbr title="World Wide Web Consortium">W3C</abbr><sup>®</sup> <a href="https://www.w3.org/policies/#Legal_Disclaimer">liability</a>, <a href="https://www.w3.org/policies/#W3C_Trademarks">trademark</a> and <a href="https://www.w3.org/copyright/software-license/" rel="license" title="W3C Software and Document License">permissive document license</a> rules apply.
</p>
<hr title="Separator for header">
</div>
<div class="p-summary" data-fill-with="abstract">
<h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="content">Abstract</span></h2>
<p>This document provides an explicit JavaScript API for interacting with WebAssembly.</p>
This is part of a collection of related documents:
the <a href="https://www.w3.org/TR/wasm-core/">Core WebAssembly Specification</a>,
the <a href="https://www.w3.org/TR/wasm-js-api/">WebAssembly JS Interface</a>,
and the <a href="https://www.w3.org/TR/wasm-web-api/">WebAssembly Web API</a>.
</div>
<h2 class="no-num no-toc no-ref heading settled" id="sotd"><span class="content">Status of this document</span></h2>
<div data-fill-with="status">
<p></p>
</div>
<div data-fill-with="at-risk"></div>
<nav data-fill-with="table-of-contents" id="toc">
<h2 class="no-num no-toc no-ref" id="contents">Table of Contents</h2>
<ol class="toc" role="directory">
<li><a href="#sample"><span class="secno">1</span> <span class="content">Sample API Usage</span></a>
<li><a href="#notation"><span class="secno">2</span> <span class="content">Notation</span></a>
<li>
<a href="#webassembly-storage"><span class="secno">3</span> <span class="content">Internal storage</span></a>
<ol class="toc">
<li><a href="#store"><span class="secno">3.1</span> <span class="content">Interaction of the WebAssembly Store with JavaScript</span></a>
<li><a href="#object-caches"><span class="secno">3.2</span> <span class="content">WebAssembly JS Object Caches</span></a>
</ol>
<li>
<a href="#webassembly-namespace"><span class="secno">4</span> <span class="content">The WebAssembly Namespace</span></a>
<ol class="toc">
<li><a href="#modules"><span class="secno">4.1</span> <span class="content">Modules</span></a>
<li><a href="#instances"><span class="secno">4.2</span> <span class="content">Instances</span></a>
<li><a href="#memories"><span class="secno">4.3</span> <span class="content">Memories</span></a>
<li><a href="#tables"><span class="secno">4.4</span> <span class="content">Tables</span></a>
<li><a href="#globals"><span class="secno">4.5</span> <span class="content">Globals</span></a>
<li><a href="#exported-function-exotic-objects"><span class="secno">4.6</span> <span class="content">Exported Functions</span></a>
<li>
<a href="#tags"><span class="secno">4.7</span> <span class="content">Tags</span></a>
<ol class="toc">
<li><a href="#exceptions-types"><span class="secno">4.7.1</span> <span class="content">Exception types</span></a>
<li><a href="#runtime-exceptions"><span class="secno">4.7.2</span> <span class="content">Runtime exceptions</span></a>
<li><a href="#js-exceptions"><span class="secno">4.7.3</span> <span class="content">JavaScript exceptions</span></a>
</ol>
<li><a href="#error-objects"><span class="secno">4.8</span> <span class="content">Error Objects</span></a>
</ol>
<li>
<a href="#errors"><span class="secno">5</span> <span class="content">Error Condition Mappings to JavaScript</span></a>
<ol class="toc">
<li><a href="#stack-overflow"><span class="secno">5.1</span> <span class="content">Stack Overflow</span></a>
<li><a href="#out-of-memory"><span class="secno">5.2</span> <span class="content">Out of Memory</span></a>
</ol>
<li><a href="#limits"><span class="secno">6</span> <span class="content">Implementation-defined Limits</span></a>
<li><a href="#security-considerations"><span class="secno">7</span> <span class="content">Security and Privacy Considerations</span></a>
<li>
<a href="#w3c-conformance"><span class="secno"></span> <span class="content">Conformance</span></a>
<ol class="toc">
<li><a href="#w3c-conventions"><span class="secno"></span> <span class="content">Document conventions</span></a>
<li><a href="#w3c-conformant-algorithms"><span class="secno"></span> <span class="content">Conformant Algorithms</span></a>
</ol>
<li>
<a href="#index"><span class="secno"></span> <span class="content">Index</span></a>
<ol class="toc">
<li><a href="#index-defined-here"><span class="secno"></span> <span class="content">Terms defined by this specification</span></a>
<li><a href="#index-defined-elsewhere"><span class="secno"></span> <span class="content">Terms defined by reference</span></a>
</ol>
<li>
<a href="#references"><span class="secno"></span> <span class="content">References</span></a>
<ol class="toc">
<li><a href="#normative"><span class="secno"></span> <span class="content">Normative References</span></a>
<li><a href="#informative"><span class="secno"></span> <span class="content">Informative References</span></a>
</ol>
<li><a href="#idl-index"><span class="secno"></span> <span class="content">IDL Index</span></a>
<li><a href="#issues-index"><span class="secno"></span> <span class="content">Issues Index</span></a>
</ol>
</nav>
<main>
<p>This API provides a way to access WebAssembly <a data-link-type="biblio" href="#biblio-webassembly" title="WebAssembly Core Specification">[WEBASSEMBLY]</a> through a bridge to explicitly construct modules from JavaScript <a data-link-type="biblio" href="#biblio-ecmascript" title="ECMAScript Language Specification">[ECMASCRIPT]</a>.</p>
<h2 class="heading settled" data-level="1" id="sample"><span class="secno">1. </span><span class="content">Sample API Usage</span><a class="self-link" href="#sample"></a></h2>
<p><em>This section is non-normative.</em></p>
<p>Given <code>demo.wat</code> (encoded to <code>demo.wasm</code>):</p>
<pre class="language-lisp highlight"><c- p>(</c-><c- g>module</c->
<c- p>(</c->import <c- s>"js"</c-> <c- s>"import1"</c-> <c- p>(</c-><c- g>func</c-> <c- g>$i1</c-><c- p>))</c->
<c- p>(</c->import <c- s>"js"</c-> <c- s>"import2"</c-> <c- p>(</c-><c- g>func</c-> <c- g>$i2</c-><c- p>))</c->
<c- p>(</c-><c- g>func</c-> <c- g>$main</c-> <c- p>(</c-><c- g>call</c-> <c- g>$i1</c-><c- p>))</c->
<c- p>(</c-><c- g>start</c-> <c- g>$main</c-><c- p>)</c->
<c- p>(</c-><c- g>func</c-> <c- p>(</c->export <c- s>"f"</c-><c- p>)</c-> <c- p>(</c-><c- g>call</c-> <c- g>$i2</c-><c- p>))</c->
<c- p>)</c->
</pre>
<p>and the following JavaScript, run in a browser:</p>
<pre class="language-javascript highlight"><c- a>var</c-> importObj <c- o>=</c-> <c- p>{</c->js<c- o>:</c-> <c- p>{</c->
import1<c- o>:</c-> <c- p>()</c-> <c- p>=></c-> console<c- p>.</c->log<c- p>(</c-><c- u>"hello,"</c-><c- p>),</c->
import2<c- o>:</c-> <c- p>()</c-> <c- p>=></c-> console<c- p>.</c->log<c- p>(</c-><c- u>"world!"</c-><c- p>)</c->
<c- p>}};</c->
fetch<c- p>(</c-><c- t>'demo.wasm'</c-><c- p>).</c->then<c- p>(</c->response <c- p>=></c->
response<c- p>.</c->arrayBuffer<c- p>()</c->
<c- p>).</c->then<c- p>(</c->buffer <c- p>=></c->
WebAssembly<c- p>.</c->instantiate<c- p>(</c->buffer<c- p>,</c-> importObj<c- p>)</c->
<c- p>).</c->then<c- p>(({</c->module<c- p>,</c-> instance<c- p>})</c-> <c- p>=></c->
instance<c- p>.</c->exports<c- p>.</c->f<c- p>()</c->
<c- p>);</c->
</pre>
<h2 class="heading settled" data-level="2" id="notation"><span class="secno">2. </span><span class="content">Notation</span><a class="self-link" href="#notation"></a></h2>
<p>This specification depends on the Infra Standard. <a data-link-type="biblio" href="#biblio-infra" title="Infra Standard">[INFRA]</a></p>
<p>The WebAssembly <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/syntax/conventions.html#grammar-notation" id="ref-for-grammar-notation">sequence</a> type is equivalent to the <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list">list</a> type defined there; values of one
are treated as values of the other transparently.</p>
<h2 class="heading settled" data-level="3" id="webassembly-storage"><span class="secno">3. </span><span class="content">Internal storage</span><a class="self-link" href="#webassembly-storage"></a></h2>
<h3 class="heading settled" data-level="3.1" id="store"><span class="secno">3.1. </span><span class="content">Interaction of the WebAssembly Store with JavaScript</span><a class="self-link" href="#store"></a></h3>
<p class="note" role="note"><span class="marker">Note:</span> WebAssembly semantics are defined in terms of an abstract <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-store" id="ref-for-syntax-store">store</a>, representing the state of the WebAssembly abstract machine. WebAssembly operations take a store and return an updated store.</p>
<p>Each <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#realm&apos;s-agent" id="ref-for-realm&apos;s-agent">agent</a> has an <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="associated-store">associated store</dfn>. When a new agent is created, its associated store is set to the result of <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-store-init" id="ref-for-embed-store-init">store_init</a>().</p>
<p class="note" role="note"><span class="marker">Note:</span> In this specification, no WebAssembly-related objects, memory or addresses can be shared among agents in an <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#sec-agent-clusters" id="ref-for-sec-agent-clusters">agent cluster</a>. In a future version of WebAssembly, this may change.</p>
<p>Elements of the WebAssembly store may be <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="identified-with">identified with</dfn> JavaScript values. In particular, each WebAssembly <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#memory-instances" id="ref-for-memory-instances">memory instance</a> with a corresponding <code class="idl"><a data-link-type="idl" href="#memory" id="ref-for-memory">Memory</a></code> object is identified with a JavaScript <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/ecmascript-data-types-and-values.html#sec-data-blocks" id="ref-for-sec-data-blocks">Data Block</a>; modifications to this Data Block are identified to updating the agent’s store to a store which reflects those changes, and vice versa.</p>
<h3 class="heading settled" data-level="3.2" id="object-caches"><span class="secno">3.2. </span><span class="content">WebAssembly JS Object Caches</span><a class="self-link" href="#object-caches"></a></h3>
<p class="note" role="note"><span class="marker">Note:</span> There are several WebAssembly objects that may have a corresponding JavaScript object. The correspondence is stored in a per-agent mapping from WebAssembly <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#addresses" id="ref-for-addresses">address</a>es to JavaScript objects.
This mapping is used to ensure that, for a given <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#realm&apos;s-agent" id="ref-for-realm&apos;s-agent①">agent</a>, there exists at most one JavaScript object for a particular WebAssembly address. However, this property does not hold for shared objects.</p>
<p>Each <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#realm&apos;s-agent" id="ref-for-realm&apos;s-agent②">agent</a> is associated with the following <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#ordered-map" id="ref-for-ordered-map">ordered map</a>s:</p>
<ul>
<li data-md>
<p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="memory-object-cache">Memory object cache</dfn>, mapping <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-memaddr" id="ref-for-syntax-memaddr">memory address</a>es to <code class="idl"><a data-link-type="idl" href="#memory" id="ref-for-memory①">Memory</a></code> objects.</p>
<li data-md>
<p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="table-object-cache">Table object cache</dfn>, mapping <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-tableaddr" id="ref-for-syntax-tableaddr">table address</a>es to <code class="idl"><a data-link-type="idl" href="#table" id="ref-for-table">Table</a></code> objects.</p>
<li data-md>
<p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="exported-function-cache">Exported Function cache</dfn>, mapping <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-funcaddr" id="ref-for-syntax-funcaddr">function address</a>es to <a data-link-type="dfn" href="#exported-function" id="ref-for-exported-function">Exported Function</a> objects.</p>
<li data-md>
<p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="global-object-cache">Global object cache</dfn>, mapping <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-globaladdr" id="ref-for-syntax-globaladdr">global address</a>es to <code class="idl"><a data-link-type="idl" href="#global" id="ref-for-global">Global</a></code> objects.</p>
<li data-md>
<p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="extern-value-cache">Extern value cache</dfn>, mapping <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externaddr" id="ref-for-syntax-externaddr">extern address</a>es to values.</p>
<li data-md>
<p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="tag-object-cache">Tag object cache</dfn>, mapping <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-tagaddr" id="ref-for-syntax-tagaddr">tag addresses</a> to <code class="idl"><a data-link-type="idl" href="#tag" id="ref-for-tag">Tag</a></code> objects.</p>
</ul>
<h2 class="heading settled" data-level="4" id="webassembly-namespace"><span class="secno">4. </span><span class="content">The WebAssembly Namespace</span><a class="self-link" href="#webassembly-namespace"></a></h2>
<pre class="idl highlight def"><c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-webassemblyinstantiatedsource"><code><c- g>WebAssemblyInstantiatedSource</c-></code></dfn> {
<c- b>required</c-> <a data-link-type="idl-name" href="#module" id="ref-for-module"><c- n>Module</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="WebAssemblyInstantiatedSource" data-dfn-type="dict-member" data-export data-type="Module" id="dom-webassemblyinstantiatedsource-module"><code><c- g>module</c-></code></dfn>;
<c- b>required</c-> <a data-link-type="idl-name" href="#instance" id="ref-for-instance"><c- n>Instance</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="WebAssemblyInstantiatedSource" data-dfn-type="dict-member" data-export data-type="Instance" id="dom-webassemblyinstantiatedsource-instance"><code><c- g>instance</c-></code></dfn>;
};
[Exposed=*]
<c- b>namespace</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="namespace" data-export id="namespacedef-webassembly"><code><c- g>WebAssembly</c-></code></dfn> {
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean" id="ref-for-idl-boolean"><c- b>boolean</c-></a> <a class="idl-code" data-link-type="method" href="#dom-webassembly-validate" id="ref-for-dom-webassembly-validate"><c- g>validate</c-></a>(<a data-link-type="idl-name" href="https://webidl.spec.whatwg.org/#BufferSource" id="ref-for-BufferSource"><c- n>BufferSource</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="WebAssembly/validate(bytes)" data-dfn-type="argument" data-export id="dom-webassembly-validate-bytes-bytes"><code><c- g>bytes</c-></code></dfn>);
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-promise" id="ref-for-idl-promise"><c- b>Promise</c-></a>&lt;<a data-link-type="idl-name" href="#module" id="ref-for-module①"><c- n>Module</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-webassembly-compile" id="ref-for-dom-webassembly-compile"><c- g>compile</c-></a>(<a data-link-type="idl-name" href="https://webidl.spec.whatwg.org/#BufferSource" id="ref-for-BufferSource①"><c- n>BufferSource</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="WebAssembly/compile(bytes)" data-dfn-type="argument" data-export id="dom-webassembly-compile-bytes-bytes"><code><c- g>bytes</c-></code></dfn>);
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-promise" id="ref-for-idl-promise①"><c- b>Promise</c-></a>&lt;<a data-link-type="idl-name" href="#dictdef-webassemblyinstantiatedsource" id="ref-for-dictdef-webassemblyinstantiatedsource"><c- n>WebAssemblyInstantiatedSource</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-webassembly-instantiate" id="ref-for-dom-webassembly-instantiate"><c- g>instantiate</c-></a>(
<a data-link-type="idl-name" href="https://webidl.spec.whatwg.org/#BufferSource" id="ref-for-BufferSource②"><c- n>BufferSource</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="WebAssembly/instantiate(bytes, importObject), WebAssembly/instantiate(bytes)" data-dfn-type="argument" data-export id="dom-webassembly-instantiate-bytes-importobject-bytes"><code><c- g>bytes</c-></code></dfn>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-object" id="ref-for-idl-object"><c- b>object</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="WebAssembly/instantiate(bytes, importObject), WebAssembly/instantiate(bytes)" data-dfn-type="argument" data-export id="dom-webassembly-instantiate-bytes-importobject-importobject"><code><c- g>importObject</c-></code></dfn>);
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-promise" id="ref-for-idl-promise②"><c- b>Promise</c-></a>&lt;<a data-link-type="idl-name" href="#instance" id="ref-for-instance①"><c- n>Instance</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-webassembly-instantiate-moduleobject-importobject" id="ref-for-dom-webassembly-instantiate-moduleobject-importobject"><c- g>instantiate</c-></a>(
<a data-link-type="idl-name" href="#module" id="ref-for-module②"><c- n>Module</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="WebAssembly/instantiate(moduleObject, importObject), WebAssembly/instantiate(moduleObject)" data-dfn-type="argument" data-export id="dom-webassembly-instantiate-moduleobject-importobject-moduleobject"><code><c- g>moduleObject</c-></code></dfn>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-object" id="ref-for-idl-object①"><c- b>object</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="WebAssembly/instantiate(moduleObject, importObject), WebAssembly/instantiate(moduleObject)" data-dfn-type="argument" data-export id="dom-webassembly-instantiate-moduleobject-importobject-importobject"><code><c- g>importObject</c-></code></dfn>);
};
</pre>
<div class="algorithm" data-algorithm="compile a WebAssembly module">
To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="compile-a-webassembly-module">compile a WebAssembly module</dfn> from source bytes <var>bytes</var>, perform the following steps:
<ol>
<li data-md>
<p>Let <var>module</var> be <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-module-decode" id="ref-for-embed-module-decode">module_decode</a>(<var>bytes</var>). If <var>module</var> is <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-error" id="ref-for-embed-error">error</a>, return <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-error" id="ref-for-embed-error①">error</a>.</p>
<li data-md>
<p>If <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-module-validate" id="ref-for-embed-module-validate">module_validate</a>(<var>module</var>) is <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-error" id="ref-for-embed-error②">error</a>, return <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-error" id="ref-for-embed-error③">error</a>.</p>
<li data-md>
<p>Return <var>module</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="validate(bytes)" data-algorithm-for="WebAssembly">
The <dfn class="dfn-paneled idl-code" data-dfn-for="WebAssembly" data-dfn-type="method" data-export id="dom-webassembly-validate"><code>validate(<var>bytes</var>)</code></dfn> method, when invoked, performs the following steps:
<ol>
<li data-md>
<p>Let <var>stableBytes</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy" id="ref-for-dfn-get-buffer-source-copy">copy of the bytes held by the buffer</a> <var>bytes</var>.</p>
<li data-md>
<p><a data-link-type="dfn" href="#compile-a-webassembly-module" id="ref-for-compile-a-webassembly-module">Compile</a> <var>stableBytes</var> as a WebAssembly module and store the results as <var>module</var>.</p>
<li data-md>
<p>If <var>module</var> is <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-error" id="ref-for-embed-error④">error</a>, return false.</p>
<li data-md>
<p>Return true.</p>
</ol>
</div>
<p>A <code class="idl"><a data-link-type="idl" href="#module" id="ref-for-module③">Module</a></code> object represents a single WebAssembly module. Each <code class="idl"><a data-link-type="idl" href="#module" id="ref-for-module④">Module</a></code> object has the following internal slots:</p>
<ul>
<li data-md>
<p>[[Module]] : a WebAssembly <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/syntax/modules.html#syntax-module" id="ref-for-syntax-module">module</a></p>
<li data-md>
<p>[[Bytes]] : the source bytes of [[Module]].</p>
</ul>
<div class="algorithm" data-algorithm="construct a WebAssembly module object">
To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="construct-a-webassembly-module-object">construct a WebAssembly module object</dfn> from a module <var>module</var> and source bytes <var>bytes</var>, perform the following steps:
<ol>
<li data-md>
<p>Let <var>moduleObject</var> be a new <code class="idl"><a data-link-type="idl" href="#module" id="ref-for-module⑤">Module</a></code> object.</p>
<li data-md>
<p>Set <var>moduleObject</var>.[[Module]] to <var>module</var>.</p>
<li data-md>
<p>Set <var>moduleObject</var>.[[Bytes]] to <var>bytes</var>.</p>
<li data-md>
<p>Return <var>moduleObject</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="asynchronously compile a WebAssembly module">
To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="asynchronously-compile-a-webassembly-module">asynchronously compile a WebAssembly module</dfn> from source bytes <var>bytes</var>, using optional <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#task-source" id="ref-for-task-source">task source</a> <var>taskSource</var>, perform the following steps:
<ol>
<li data-md>
<p>Let <var>promise</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#a-new-promise" id="ref-for-a-new-promise">a new promise</a>.</p>
<li data-md>
<p>Run the following steps <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel">in parallel</a>:</p>
<ol>
<li data-md>
<p><a data-link-type="dfn" href="#compile-a-webassembly-module" id="ref-for-compile-a-webassembly-module①">Compile the WebAssembly module</a> <var>bytes</var> and store the result as <var>module</var>.</p>
<li data-md>
<p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task">Queue a task</a> to perform the following steps. If <var>taskSource</var> was provided, queue the task on that task source.</p>
<ol>
<li data-md>
<p>If <var>module</var> is <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-error" id="ref-for-embed-error⑤">error</a>, reject <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="#exceptiondef-compileerror" id="ref-for-exceptiondef-compileerror">CompileError</a></code> exception.</p>
<li data-md>
<p>Otherwise,</p>
<ol>
<li data-md>
<p><a data-link-type="dfn" href="#construct-a-webassembly-module-object" id="ref-for-construct-a-webassembly-module-object">Construct a WebAssembly module object</a> from <var>module</var> and <var>bytes</var>, and let <var>moduleObject</var> be the result.</p>
<li data-md>
<p><a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#resolve" id="ref-for-resolve">Resolve</a> <var>promise</var> with <var>moduleObject</var>.</p>
</ol>
</ol>
</ol>
<li data-md>
<p>Return <var>promise</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="compile(bytes)" data-algorithm-for="WebAssembly">
The <dfn class="dfn-paneled idl-code" data-dfn-for="WebAssembly" data-dfn-type="method" data-export id="dom-webassembly-compile"><code>compile(<var>bytes</var>)</code></dfn> method, when invoked, performs the following steps:
<ol>
<li data-md>
<p>Let <var>stableBytes</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy" id="ref-for-dfn-get-buffer-source-copy①">copy of the bytes held by the buffer</a> <var>bytes</var>.</p>
<li data-md>
<p><a data-link-type="dfn" href="#asynchronously-compile-a-webassembly-module" id="ref-for-asynchronously-compile-a-webassembly-module">Asynchronously compile a WebAssembly module</a> from <var>stableBytes</var> and return the result.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="read-the-imports">
To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="read-the-imports">read the imports</dfn> from a WebAssembly module <var>module</var> from imports object <var>importObject</var>, perform the following steps:
<ol>
<li data-md>
<p>If <var>module</var>.<a data-link-type="dfn" data-refhint-key="8c460f10" href="https://webassembly.github.io/exception-handling/core/syntax/modules.html#syntax-module" id="ref-for-syntax-module①">imports</a> <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-is-empty" id="ref-for-list-is-empty">is not empty</a>, and <var>importObject</var> is undefined, throw a <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-typeerror" id="ref-for-sec-native-error-types-used-in-this-standard-typeerror">TypeError</a></code> exception.</p>
<li data-md>
<p>Let <var>imports</var> be « ».</p>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate">For each</a> (<var>moduleName</var>, <var>componentName</var>, <var>externtype</var>) of <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-module-imports" id="ref-for-embed-module-imports">module_imports</a>(<var>module</var>),</p>
<ol>
<li data-md>
<p>Let <var>o</var> be <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-returnifabrupt-shorthands" id="ref-for-sec-returnifabrupt-shorthands">?</a> <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-get-o-p" id="ref-for-sec-get-o-p">Get</a>(<var>importObject</var>, <var>moduleName</var>).</p>
<li data-md>
<p>If <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values" id="ref-for-sec-ecmascript-data-types-and-values">Type</a>(<var>o</var>) is not Object, throw a <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-typeerror" id="ref-for-sec-native-error-types-used-in-this-standard-typeerror①">TypeError</a></code> exception.</p>
<li data-md>
<p>Let <var>v</var> be <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-returnifabrupt-shorthands" id="ref-for-sec-returnifabrupt-shorthands①">?</a> <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-get-o-p" id="ref-for-sec-get-o-p①">Get</a>(<var>o</var>, <var>componentName</var>).</p>
<li data-md>
<p>If <var>externtype</var> is of the form <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#external-types" id="ref-for-external-types">func</a> <var>functype</var>,</p>
<ol>
<li data-md>
<p>If <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-iscallable" id="ref-for-sec-iscallable">IsCallable</a>(<var>v</var>) is false, throw a <code class="idl"><a data-link-type="idl" href="#exceptiondef-linkerror" id="ref-for-exceptiondef-linkerror">LinkError</a></code> exception.</p>
<li data-md>
<p>If <var>v</var> has a [[FunctionAddress]] internal slot, and therefore is an <a data-link-type="dfn" href="#exported-function" id="ref-for-exported-function①">Exported Function</a>,</p>
<ol>
<li data-md>
<p>Let <var>funcaddr</var> be the value of <var>v</var>’s [[FunctionAddress]] internal slot.</p>
</ol>
<li data-md>
<p>Otherwise,</p>
<ol>
<li data-md>
<p><a data-link-type="dfn" href="#create-a-host-function" id="ref-for-create-a-host-function">Create a host function</a> from <var>v</var> and <var>functype</var>, and let <var>funcaddr</var> be the result.</p>
<li data-md>
<p>Let <var>index</var> be the number of external functions in <var>imports</var>. This value <var>index</var> is known as the <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="index-of-the-host-function">index of the host function</dfn> <var>funcaddr</var>.</p>
</ol>
<li data-md>
<p>Let <var>externfunc</var> be the <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externval" id="ref-for-syntax-externval">external value</a> <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externval" id="ref-for-syntax-externval①">func</a> <var>funcaddr</var>.</p>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-append" id="ref-for-list-append">Append</a> <var>externfunc</var> to <var>imports</var>.</p>
</ol>
<li data-md>
<p>If <var>externtype</var> is of the form <a data-link-type="dfn" data-refhint-key="de80bf22" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#external-types" id="ref-for-external-types①">global</a> <var>mut</var> <var>valtype</var>,</p>
<ol>
<li data-md>
<p>If <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values" id="ref-for-sec-ecmascript-data-types-and-values①">Type</a>(<var>v</var>) is Number or BigInt,</p>
<ol>
<li data-md>
<p>If <var>valtype</var> is <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-numtype" id="ref-for-syntax-numtype">i64</a> and <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values" id="ref-for-sec-ecmascript-data-types-and-values②">Type</a>(<var>v</var>) is Number,</p>
<ol>
<li data-md>
<p>Throw a <code class="idl"><a data-link-type="idl" href="#exceptiondef-linkerror" id="ref-for-exceptiondef-linkerror①">LinkError</a></code> exception.</p>
</ol>
<li data-md>
<p>If <var>valtype</var> is not <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-numtype" id="ref-for-syntax-numtype①">i64</a> and <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values" id="ref-for-sec-ecmascript-data-types-and-values③">Type</a>(<var>v</var>) is BigInt,</p>
<ol>
<li data-md>
<p>Throw a <code class="idl"><a data-link-type="idl" href="#exceptiondef-linkerror" id="ref-for-exceptiondef-linkerror②">LinkError</a></code> exception.</p>
</ol>
<li data-md>
<p>If <var>valtype</var> is <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#vector-types" id="ref-for-vector-types">v128</a>,</p>
<ol>
<li data-md>
<p>Throw a <code class="idl"><a data-link-type="idl" href="#exceptiondef-linkerror" id="ref-for-exceptiondef-linkerror③">LinkError</a></code> exception.</p>
</ol>
<li data-md>
<p>Let <var>value</var> be <a data-link-type="dfn" href="#towebassemblyvalue" id="ref-for-towebassemblyvalue">ToWebAssemblyValue</a>(<var>v</var>, <var>valtype</var>).</p>
<li data-md>
<p>Let <var>store</var> be the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent">surrounding agent</a>’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store">associated store</a>.</p>
<li data-md>
<p>Let (<var>store</var>, <var>globaladdr</var>) be <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-global-alloc" id="ref-for-embed-global-alloc">global_alloc</a>(<var>store</var>, <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-mut" id="ref-for-syntax-mut">const</a> <var>valtype</var>, <var>value</var>).</p>
<li data-md>
<p>Set the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent①">surrounding agent</a>’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store①">associated store</a> to <var>store</var>.</p>
</ol>
<li data-md>
<p>Otherwise, if <var>v</var> <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#implements" id="ref-for-implements">implements</a> <code class="idl"><a data-link-type="idl" href="#global" id="ref-for-global①">Global</a></code>,</p>
<ol>
<li data-md>
<p>Let <var>globaladdr</var> be <var>v</var>.[[Global]].</p>
</ol>
<li data-md>
<p>Otherwise,</p>
<ol>
<li data-md>
<p>Throw a <code class="idl"><a data-link-type="idl" href="#exceptiondef-linkerror" id="ref-for-exceptiondef-linkerror④">LinkError</a></code> exception.</p>
</ol>
<li data-md>
<p>Let <var>externglobal</var> be <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externval" id="ref-for-syntax-externval②">global</a> <var>globaladdr</var>.</p>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-append" id="ref-for-list-append①">Append</a> <var>externglobal</var> to <var>imports</var>.</p>
</ol>
<li data-md>
<p>If <var>externtype</var> is of the form <a data-link-type="dfn" data-refhint-key="1fee0bd3" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#external-types" id="ref-for-external-types②">mem</a> <var>memtype</var>,</p>
<ol>
<li data-md>
<p>If <var>v</var> does not <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#implements" id="ref-for-implements①">implement</a> <code class="idl"><a data-link-type="idl" href="#memory" id="ref-for-memory②">Memory</a></code>, throw a <code class="idl"><a data-link-type="idl" href="#exceptiondef-linkerror" id="ref-for-exceptiondef-linkerror⑤">LinkError</a></code> exception.</p>
<li data-md>
<p>Let <var>externmem</var> be the <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externval" id="ref-for-syntax-externval③">external value</a> <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externval" id="ref-for-syntax-externval④">mem</a> <var>v</var>.[[Memory]].</p>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-append" id="ref-for-list-append②">Append</a> <var>externmem</var> to <var>imports</var>.</p>
</ol>
<li data-md>
<p>If <var>externtype</var> is of the form <a data-link-type="dfn" data-refhint-key="c47e6fe0" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#external-types" id="ref-for-external-types③">table</a> <var>tabletype</var>,</p>
<ol>
<li data-md>
<p>If <var>v</var> does not <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#implements" id="ref-for-implements②">implement</a> <code class="idl"><a data-link-type="idl" href="#table" id="ref-for-table①">Table</a></code>, throw a <code class="idl"><a data-link-type="idl" href="#exceptiondef-linkerror" id="ref-for-exceptiondef-linkerror⑥">LinkError</a></code> exception.</p>
<li data-md>
<p>Let <var>tableaddr</var> be <var>v</var>.[[Table]].</p>
<li data-md>
<p>Let <var>externtable</var> be the <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externval" id="ref-for-syntax-externval⑤">external value</a> <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externval" id="ref-for-syntax-externval⑥">table</a> <var>tableaddr</var>.</p>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-append" id="ref-for-list-append③">Append</a> <var>externtable</var> to <var>imports</var>.</p>
</ol>
<li data-md>
<p>If <var>externtype</var> is of the form <a data-link-type="dfn" data-refhint-key="9869f381" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#external-types" id="ref-for-external-types④">tag</a> <var>attribute</var> <var>functype</var>,</p>
<ol>
<li data-md>
<p class="assertion">Assert: <var>attribute</var> is <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-tagtype" id="ref-for-syntax-tagtype">exception</a>.</p>
<li data-md>
<p>If <var>v</var> does not <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#implements" id="ref-for-implements③">implement</a> <code class="idl"><a data-link-type="idl" href="#tag" id="ref-for-tag①">Tag</a></code>, throw a <code class="idl"><a data-link-type="idl" href="#exceptiondef-linkerror" id="ref-for-exceptiondef-linkerror⑦">LinkError</a></code> exception.</p>
<li data-md>
<p>Let <var>tagaddr</var> be <var>v</var>.[[Address]].</p>
<li data-md>
<p>Let <var>externtag</var> be the <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externval" id="ref-for-syntax-externval⑦">external value</a> <a data-link-type="dfn" data-refhint-key="5a26c06c" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externval" id="ref-for-syntax-externval⑧">tag</a> <var>tagaddr</var>.</p>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-append" id="ref-for-list-append④">Append</a> <var>externtag</var> to <var>imports</var>.</p>
</ol>
</ol>
<li data-md>
<p>Return <var>imports</var>.</p>
</ol>
<p class="note" role="note"><span class="marker">Note:</span> This algorithm only verifies the right kind of JavaScript values are passed.
The verification of WebAssembly type requirements is deferred to the
"<a data-link-type="dfn" href="#instantiate-the-core-of-a-webassembly-module" id="ref-for-instantiate-the-core-of-a-webassembly-module">instantiate the core of a WebAssembly module</a>" algorithm.</p>
</div>
<div class="algorithm" data-algorithm="create an exports object">
To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="create-an-exports-object">create an exports object</dfn> from a WebAssembly module <var>module</var> and instance <var>instance</var>, perform the following steps:
<ol>
<li data-md>
<p>Let <var>exportsObject</var> be <a data-link-type="dfn" data-refhint-key="f4fa6c3b" href="https://tc39.github.io/ecma262/#sec-returnifabrupt-shorthands" id="ref-for-sec-returnifabrupt-shorthands②">!</a> <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/ordinary-and-exotic-objects-behaviours.html#sec-ordinaryobjectcreate" id="ref-for-sec-ordinaryobjectcreate">OrdinaryObjectCreate</a>(null).</p>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate①">For each</a> (<var>name</var>, <var>externtype</var>) of <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-module-exports" id="ref-for-embed-module-exports">module_exports</a>(<var>module</var>),</p>
<ol>
<li data-md>
<p>Let <var>externval</var> be <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-instance-export" id="ref-for-embed-instance-export">instance_export</a>(<var>instance</var>, <var>name</var>).</p>
<li data-md>
<p class="assertion">Assert: <var>externval</var> is not <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-error" id="ref-for-embed-error⑥">error</a>.</p>
<li data-md>
<p>If <var>externtype</var> is of the form <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#external-types" id="ref-for-external-types⑤">func</a> <var>functype</var>,</p>
<ol>
<li data-md>
<p class="assertion">Assert: <var>externval</var> is of the form <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externval" id="ref-for-syntax-externval⑨">func</a> <var>funcaddr</var>.</p>
<li data-md>
<p>Let <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externval" id="ref-for-syntax-externval①⓪">func</a> <var>funcaddr</var> be <var>externval</var>.</p>
<li data-md>
<p>Let <var>func</var> be the result of creating <a data-link-type="dfn" href="#a-new-exported-function" id="ref-for-a-new-exported-function">a new Exported Function</a> from <var>funcaddr</var>.</p>
<li data-md>
<p>Let <var>value</var> be <var>func</var>.</p>
</ol>
<li data-md>
<p>If <var>externtype</var> is of the form <a data-link-type="dfn" data-refhint-key="de80bf22" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#external-types" id="ref-for-external-types⑥">global</a> <var>mut</var> <var>globaltype</var>,</p>
<ol>
<li data-md>
<p class="assertion">Assert: <var>externval</var> is of the form <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externval" id="ref-for-syntax-externval①①">global</a> <var>globaladdr</var>.</p>
<li data-md>
<p>Let <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externval" id="ref-for-syntax-externval①②">global</a> <var>globaladdr</var> be <var>externval</var>.</p>
<li data-md>
<p>Let <var>global</var> be <a data-link-type="dfn" href="#create-a-global-object" id="ref-for-create-a-global-object">a new Global object</a> created from <var>globaladdr</var>.</p>
<li data-md>
<p>Let <var>value</var> be <var>global</var>.</p>
</ol>
<li data-md>
<p>If <var>externtype</var> is of the form <a data-link-type="dfn" data-refhint-key="1fee0bd3" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#external-types" id="ref-for-external-types⑦">mem</a> <var>memtype</var>,</p>
<ol>
<li data-md>
<p class="assertion">Assert: <var>externval</var> is of the form <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externval" id="ref-for-syntax-externval①③">mem</a> <var>memaddr</var>.</p>
<li data-md>
<p>Let <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externval" id="ref-for-syntax-externval①④">mem</a> <var>memaddr</var> be <var>externval</var>.</p>
<li data-md>
<p>Let <var>memory</var> be <a data-link-type="dfn" href="#create-a-memory-object" id="ref-for-create-a-memory-object">a new Memory object</a> created from <var>memaddr</var>.</p>
<li data-md>
<p>Let <var>value</var> be <var>memory</var>.</p>
</ol>
<li data-md>
<p>If <var>externtype</var> is of the form <a data-link-type="dfn" data-refhint-key="c47e6fe0" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#external-types" id="ref-for-external-types⑧">table</a> <var>tabletype</var>,</p>
<ol>
<li data-md>
<p class="assertion">Assert: <var>externval</var> is of the form <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externval" id="ref-for-syntax-externval①⑤">table</a> <var>tableaddr</var>.</p>
<li data-md>
<p>Let <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externval" id="ref-for-syntax-externval①⑥">table</a> <var>tableaddr</var> be <var>externval</var>.</p>
<li data-md>
<p>Let <var>table</var> be <a data-link-type="dfn" href="#create-a-table-object" id="ref-for-create-a-table-object">a new Table object</a> created from <var>tableaddr</var>.</p>
<li data-md>
<p>Let <var>value</var> be <var>table</var>.</p>
</ol>
<li data-md>
<p>If <var>externtype</var> is of the form <a data-link-type="dfn" data-refhint-key="9869f381" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#external-types" id="ref-for-external-types⑨">tag</a> <var>attribute</var> <var>functype</var>,</p>
<ol>
<li data-md>
<p class="assertion">Assert: <var>attribute</var> is <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-tagtype" id="ref-for-syntax-tagtype①">exception</a>.</p>
<li data-md>
<p class="assertion">Assert: <var>externval</var> is of the form <a data-link-type="dfn" data-refhint-key="5a26c06c" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externval" id="ref-for-syntax-externval①⑦">tag</a> <var>tagaddr</var>.</p>
<li data-md>
<p>Let <a data-link-type="dfn" data-refhint-key="5a26c06c" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externval" id="ref-for-syntax-externval①⑧">tag</a> <var>tagaddr</var> be <var>externval</var>.</p>
<li data-md>
<p>Let <var>tag</var> be <a data-link-type="dfn" href="#create-a-tag-object" id="ref-for-create-a-tag-object">a new Tag object</a> created from <var>tagaddr</var>.</p>
<li data-md>
<p>Let <var>value</var> be <var>tag</var>.</p>
</ol>
<li data-md>
<p>Let <var>status</var> be <a data-link-type="dfn" data-refhint-key="f4fa6c3b" href="https://tc39.github.io/ecma262/#sec-returnifabrupt-shorthands" id="ref-for-sec-returnifabrupt-shorthands③">!</a> <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-createdataproperty" id="ref-for-sec-createdataproperty">CreateDataProperty</a>(<var>exportsObject</var>, <var>name</var>, <var>value</var>).</p>
<li data-md>
<p class="assertion">Assert: <var>status</var> is true.</p>
</ol>
<p class="note" role="note"><span class="marker">Note:</span> the validity and uniqueness checks performed during <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/valid/modules.html#valid-module" id="ref-for-valid-module">WebAssembly module validation</a> ensure that each property name is valid and no properties are defined twice.</p>
<li data-md>
<p>Perform <a data-link-type="dfn" data-refhint-key="f4fa6c3b" href="https://tc39.github.io/ecma262/#sec-returnifabrupt-shorthands" id="ref-for-sec-returnifabrupt-shorthands④">!</a> <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-setintegritylevel" id="ref-for-sec-setintegritylevel">SetIntegrityLevel</a>(<var>exportsObject</var>, <code>"frozen"</code>).</p>
<li data-md>
<p>Return <var>exportsObject</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="initialize an instance object">
To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="initialize-an-instance-object">initialize an instance object</dfn> <var>instanceObject</var> from a WebAssembly module <var>module</var> and instance <var>instance</var>, perform the following steps:
<ol>
<li data-md>
<p><a data-link-type="dfn" href="#create-an-exports-object" id="ref-for-create-an-exports-object">Create an exports object</a> from <var>module</var> and <var>instance</var> and let <var>exportsObject</var> be the result.</p>
<li data-md>
<p>Set <var>instanceObject</var>.[[Instance]] to <var>instance</var>.</p>
<li data-md>
<p>Set <var>instanceObject</var>.[[Exports]] to <var>exportsObject</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="instantiate the core of a WebAssembly module">
To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="instantiate-the-core-of-a-webassembly-module">instantiate the core of a WebAssembly module</dfn> from a module <var>module</var> and imports <var>imports</var>, perform the following steps:
<ol>
<li data-md>
<p>Let <var>store</var> be the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent②">surrounding agent</a>’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store②">associated store</a>.</p>
<li data-md>
<p>Let <var>result</var> be <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-module-instantiate" id="ref-for-embed-module-instantiate">module_instantiate</a>(<var>store</var>, <var>module</var>, <var>imports</var>).</p>
<li data-md>
<p>If <var>result</var> is <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-error" id="ref-for-embed-error⑦">error</a>, throw an appropriate exception type:</p>
<ul>
<li data-md>
<p>A <code class="idl"><a data-link-type="idl" href="#exceptiondef-linkerror" id="ref-for-exceptiondef-linkerror⑧">LinkError</a></code> exception for most cases which occur during linking.</p>
<li data-md>
<p>If the error came when running the start function, throw a <code class="idl"><a data-link-type="idl" href="#exceptiondef-runtimeerror" id="ref-for-exceptiondef-runtimeerror">RuntimeError</a></code> for most errors which occur from WebAssembly, or the error object propagated from inner ECMAScript code.</p>
<li data-md>
<p>Another error type if appropriate, for example an out-of-memory exception, as documented in <a href="#errors">the WebAssembly error mapping</a>.</p>
</ul>
<li data-md>
<p>Let (<var>store</var>, <var>instance</var>) be <var>result</var>.</p>
<li data-md>
<p>Set the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent③">surrounding agent</a>’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store③">associated store</a> to <var>store</var>.</p>
<li data-md>
<p>Return <var>instance</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="asynchronously instantiate a WebAssembly module">
To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="asynchronously-instantiate-a-webassembly-module">asynchronously instantiate a WebAssembly module</dfn> from a <code class="idl"><a data-link-type="idl" href="#module" id="ref-for-module⑥">Module</a></code> <var>moduleObject</var> and imports <var>importObject</var>, perform the following steps:
<ol>
<li data-md>
<p>Let <var>promise</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#a-new-promise" id="ref-for-a-new-promise①">a new promise</a>.</p>
<li data-md>
<p>Let <var>module</var> be <var>moduleObject</var>.[[Module]].</p>
<li data-md>
<p><a data-link-type="dfn" href="#read-the-imports" id="ref-for-read-the-imports">Read the imports</a> of <var>module</var> with imports <var>importObject</var>, and let <var>imports</var> be the result.
If this operation throws an exception, catch it, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#reject" id="ref-for-reject">reject</a> <var>promise</var> with the exception, and return <var>promise</var>.</p>
<li data-md>
<p>Run the following steps <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel①">in parallel</a>:</p>
<ol>
<li data-md>
<p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task①">Queue a task</a> to perform the following steps:
Note: Implementation-specific work may be performed here.</p>
<ol>
<li data-md>
<p><a data-link-type="dfn" href="#instantiate-the-core-of-a-webassembly-module" id="ref-for-instantiate-the-core-of-a-webassembly-module①">Instantiate the core of a WebAssembly module</a> <var>module</var> with <var>imports</var>, and let <var>instance</var> be the result.
If this throws an exception, catch it, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#reject" id="ref-for-reject①">reject</a> <var>promise</var> with the exception, and terminate these substeps.</p>
<li data-md>
<p>Let <var>instanceObject</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new">new</a> <code class="idl"><a data-link-type="idl" href="#instance" id="ref-for-instance②">Instance</a></code>.</p>
<li data-md>
<p><a data-link-type="dfn" href="#initialize-an-instance-object" id="ref-for-initialize-an-instance-object">Initialize</a> <var>instanceObject</var> from <var>module</var> and <var>instance</var>.
If this throws an exception, catch it, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#reject" id="ref-for-reject②">reject</a> <var>promise</var> with the exception, and terminate these substeps.</p>
<li data-md>
<p><a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#resolve" id="ref-for-resolve①">Resolve</a> <var>promise</var> with <var>instanceObject</var>.</p>
</ol>
</ol>
<li data-md>
<p>Return <var>promise</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="instantiate">
To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="synchronously-instantiate-a-webassembly-module">synchronously instantiate a WebAssembly module</dfn> from a <code class="idl"><a data-link-type="idl" href="#module" id="ref-for-module⑦">Module</a></code> <var>moduleObject</var> and imports <var>importObject</var>, perform the following steps:
<ol>
<li data-md>
<p>Let <var>module</var> be <var>moduleObject</var>.[[Module]].</p>
<li data-md>
<p><a data-link-type="dfn" href="#read-the-imports" id="ref-for-read-the-imports①">Read the imports</a> of <var>module</var> with imports <var>importObject</var>, and let <var>imports</var> be the result.</p>
<li data-md>
<p><a data-link-type="dfn" href="#instantiate-the-core-of-a-webassembly-module" id="ref-for-instantiate-the-core-of-a-webassembly-module②">Instantiate the core of a WebAssembly module</a> <var>module</var> with <var>imports</var>, and let <var>instance</var> be the result.</p>
<li data-md>
<p>Let <var>instanceObject</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new①">new</a> <code class="idl"><a data-link-type="idl" href="#instance" id="ref-for-instance③">Instance</a></code>.</p>
<li data-md>
<p><a data-link-type="dfn" href="#initialize-an-instance-object" id="ref-for-initialize-an-instance-object①">Initialize</a> <var>instanceObject</var> from <var>module</var> and <var>instance</var>.</p>
<li data-md>
<p>Return <var>instanceObject</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="instantiate a promise of a module">
To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="instantiate-a-promise-of-a-module">instantiate a promise of a module</dfn> <var>promiseOfModule</var> with imports <var>importObject</var>, perform the following steps:
<ol>
<li data-md>
<p>Let <var>promise</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#a-new-promise" id="ref-for-a-new-promise②">a new promise</a>.</p>
<li data-md>
<p><a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#upon-fulfillment" id="ref-for-upon-fulfillment">Upon fulfillment</a> of <var>promiseOfModule</var> with value <var>module</var>:</p>
<ol>
<li data-md>
<p><a data-link-type="dfn" href="#asynchronously-instantiate-a-webassembly-module" id="ref-for-asynchronously-instantiate-a-webassembly-module">Instantiate the WebAssembly module</a> <var>module</var> importing <var>importObject</var>, and let <var>innerPromise</var> be the result.</p>
<li data-md>
<p><a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#upon-fulfillment" id="ref-for-upon-fulfillment①">Upon fulfillment</a> of <var>innerPromise</var> with value <var>instance</var>.</p>
<ol>
<li data-md>
<p>Let <var>result</var> be the <code class="idl"><a data-link-type="idl" href="#dictdef-webassemblyinstantiatedsource" id="ref-for-dictdef-webassemblyinstantiatedsource①">WebAssemblyInstantiatedSource</a></code> value «[ "<code class="idl"><a data-link-type="idl" href="#dom-webassemblyinstantiatedsource-module" id="ref-for-dom-webassemblyinstantiatedsource-module">module</a></code>" → <var>module</var>, "<code class="idl"><a data-link-type="idl" href="#dom-webassemblyinstantiatedsource-instance" id="ref-for-dom-webassemblyinstantiatedsource-instance">instance</a></code>" → <var>instance</var> ]».</p>
<li data-md>
<p><a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#resolve" id="ref-for-resolve②">Resolve</a> <var>promise</var> with <var>result</var>.</p>
</ol>
<li data-md>
<p><a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#upon-rejection" id="ref-for-upon-rejection">Upon rejection</a> of <var>innerPromise</var> with reason <var>reason</var>:</p>
<ol>
<li data-md>
<p><a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#reject" id="ref-for-reject③">Reject</a> <var>promise</var> with <var>reason</var>.</p>
</ol>
</ol>
<li data-md>
<p><a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#upon-rejection" id="ref-for-upon-rejection①">Upon rejection</a> of <var>promiseOfModule</var> with reason <var>reason</var>:</p>
<ol>
<li data-md>
<p><a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#reject" id="ref-for-reject④">Reject</a> <var>promise</var> with <var>reason</var>.</p>
</ol>
<li data-md>
<p>Return <var>promise</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="instantiate(bytes, importObject)" data-algorithm-for="WebAssembly">
The <dfn class="dfn-paneled idl-code" data-dfn-for="WebAssembly" data-dfn-type="method" data-export data-lt="instantiate(bytes, importObject)|instantiate(bytes)" id="dom-webassembly-instantiate"><code>instantiate(<var>bytes</var>, <var>importObject</var>)</code></dfn> method, when invoked, performs the following steps:
<ol>
<li data-md>
<p>Let <var>stableBytes</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy" id="ref-for-dfn-get-buffer-source-copy②">copy of the bytes held by the buffer</a> <var>bytes</var>.</p>
<li data-md>
<p><a data-link-type="dfn" href="#asynchronously-compile-a-webassembly-module" id="ref-for-asynchronously-compile-a-webassembly-module①">Asynchronously compile a WebAssembly module</a> from <var>stableBytes</var> and let <var>promiseOfModule</var> be the result.</p>
<li data-md>
<p><a data-link-type="dfn" href="#instantiate-a-promise-of-a-module" id="ref-for-instantiate-a-promise-of-a-module">Instantiate</a> <var>promiseOfModule</var> with imports <var>importObject</var> and return the result.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="instantiate(moduleObject, importObject)" data-algorithm-for="WebAssembly">
The <dfn class="dfn-paneled idl-code" data-dfn-for="WebAssembly" data-dfn-type="method" data-export data-lt="instantiate(moduleObject, importObject)|instantiate(moduleObject)" id="dom-webassembly-instantiate-moduleobject-importobject"><code>instantiate(<var>moduleObject</var>, <var>importObject</var>)</code></dfn> method, when invoked, performs the following steps:
<ol>
<li data-md>
<p><a data-link-type="dfn" href="#asynchronously-instantiate-a-webassembly-module" id="ref-for-asynchronously-instantiate-a-webassembly-module①">Asynchronously instantiate the WebAssembly module</a> <var>moduleObject</var> importing <var>importObject</var>, and return the result.</p>
</ol>
</div>
<p class="note" role="note"><span class="marker">Note:</span> A follow-on streaming API is documented in the <a href="https://webassembly.github.io/spec/web-api/index.html">WebAssembly Web API</a>.</p>
<h3 class="heading settled" data-level="4.1" id="modules"><span class="secno">4.1. </span><span class="content">Modules</span><a class="self-link" href="#modules"></a></h3>
<pre class="idl highlight def"><c- b>enum</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="enum" data-export id="enumdef-importexportkind"><code><c- g>ImportExportKind</c-></code></dfn> {
<dfn class="dfn-paneled idl-code" data-dfn-for="ImportExportKind" data-dfn-type="enum-value" data-export id="dom-importexportkind-function"><code><c- s>"function"</c-></code></dfn>,
<dfn class="dfn-paneled idl-code" data-dfn-for="ImportExportKind" data-dfn-type="enum-value" data-export id="dom-importexportkind-table"><code><c- s>"table"</c-></code></dfn>,
<dfn class="dfn-paneled idl-code" data-dfn-for="ImportExportKind" data-dfn-type="enum-value" data-export id="dom-importexportkind-memory"><code><c- s>"memory"</c-></code></dfn>,
<dfn class="dfn-paneled idl-code" data-dfn-for="ImportExportKind" data-dfn-type="enum-value" data-export id="dom-importexportkind-global"><code><c- s>"global"</c-></code></dfn>,
<dfn class="dfn-paneled idl-code" data-dfn-for="ImportExportKind" data-dfn-type="enum-value" data-export id="dom-importexportkind-tag"><code><c- s>"tag"</c-></code></dfn>
};
<c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-moduleexportdescriptor"><code><c- g>ModuleExportDescriptor</c-></code></dfn> {
<c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-USVString" id="ref-for-idl-USVString"><c- b>USVString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="ModuleExportDescriptor" data-dfn-type="dict-member" data-export data-type="USVString" id="dom-moduleexportdescriptor-name"><code><c- g>name</c-></code></dfn>;
<c- b>required</c-> <a data-link-type="idl-name" href="#enumdef-importexportkind" id="ref-for-enumdef-importexportkind"><c- n>ImportExportKind</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="ModuleExportDescriptor" data-dfn-type="dict-member" data-export data-type="ImportExportKind" id="dom-moduleexportdescriptor-kind"><code><c- g>kind</c-></code></dfn>;
// Note: Other fields such as signature may be added in the future.
};
<c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-moduleimportdescriptor"><code><c- g>ModuleImportDescriptor</c-></code></dfn> {
<c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-USVString" id="ref-for-idl-USVString①"><c- b>USVString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="ModuleImportDescriptor" data-dfn-type="dict-member" data-export data-type="USVString" id="dom-moduleimportdescriptor-module"><code><c- g>module</c-></code></dfn>;
<c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-USVString" id="ref-for-idl-USVString②"><c- b>USVString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="ModuleImportDescriptor" data-dfn-type="dict-member" data-export data-type="USVString" id="dom-moduleimportdescriptor-name"><code><c- g>name</c-></code></dfn>;
<c- b>required</c-> <a data-link-type="idl-name" href="#enumdef-importexportkind" id="ref-for-enumdef-importexportkind①"><c- n>ImportExportKind</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="ModuleImportDescriptor" data-dfn-type="dict-member" data-export data-type="ImportExportKind" id="dom-moduleimportdescriptor-kind"><code><c- g>kind</c-></code></dfn>;
};
[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNamespace" id="ref-for-LegacyNamespace"><c- g>LegacyNamespace</c-></a>=<a data-link-type="idl-name" href="#namespacedef-webassembly" id="ref-for-namespacedef-webassembly"><c- n>WebAssembly</c-></a>, Exposed=*]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="module"><code><c- g>Module</c-></code></dfn> {
<a class="idl-code" data-link-type="constructor" href="#dom-module-module" id="ref-for-dom-module-module"><c- g>constructor</c-></a>(<a data-link-type="idl-name" href="https://webidl.spec.whatwg.org/#BufferSource" id="ref-for-BufferSource③"><c- n>BufferSource</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="Module/Module(bytes), Module/constructor(bytes)" data-dfn-type="argument" data-export id="dom-module-module-bytes-bytes"><code><c- g>bytes</c-></code></dfn>);
<c- b>static</c-> <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence" id="ref-for-idl-sequence"><c- b>sequence</c-></a>&lt;<a data-link-type="idl-name" href="#dictdef-moduleexportdescriptor" id="ref-for-dictdef-moduleexportdescriptor"><c- n>ModuleExportDescriptor</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-module-exports" id="ref-for-dom-module-exports"><c- g>exports</c-></a>(<a data-link-type="idl-name" href="#module" id="ref-for-module⑧"><c- n>Module</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="Module/exports(moduleObject)" data-dfn-type="argument" data-export id="dom-module-exports-moduleobject-moduleobject"><code><c- g>moduleObject</c-></code></dfn>);
<c- b>static</c-> <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence" id="ref-for-idl-sequence①"><c- b>sequence</c-></a>&lt;<a data-link-type="idl-name" href="#dictdef-moduleimportdescriptor" id="ref-for-dictdef-moduleimportdescriptor"><c- n>ModuleImportDescriptor</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-module-imports" id="ref-for-dom-module-imports"><c- g>imports</c-></a>(<a data-link-type="idl-name" href="#module" id="ref-for-module⑨"><c- n>Module</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="Module/imports(moduleObject)" data-dfn-type="argument" data-export id="dom-module-imports-moduleobject-moduleobject"><code><c- g>moduleObject</c-></code></dfn>);
<c- b>static</c-> <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence" id="ref-for-idl-sequence②"><c- b>sequence</c-></a>&lt;<a class="idl-code" data-link-type="interface" href="https://tc39.github.io/ecma262/#sec-arraybuffer-objects" id="ref-for-sec-arraybuffer-objects"><c- b>ArrayBuffer</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-module-customsections" id="ref-for-dom-module-customsections"><c- g>customSections</c-></a>(<a data-link-type="idl-name" href="#module" id="ref-for-module①⓪"><c- n>Module</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="Module/customSections(moduleObject, sectionName)" data-dfn-type="argument" data-export id="dom-module-customsections-moduleobject-sectionname-moduleobject"><code><c- g>moduleObject</c-></code></dfn>, <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString" id="ref-for-idl-DOMString"><c- b>DOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="Module/customSections(moduleObject, sectionName)" data-dfn-type="argument" data-export id="dom-module-customsections-moduleobject-sectionname-sectionname"><code><c- g>sectionName</c-></code></dfn>);
};
</pre>
<div class="algorithm" data-algorithm="string value of the extern type">
The <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="string-value-of-the-extern-type">string value of the extern type</dfn> <var>type</var> is
<ul>
<li data-md>
<p>"function" if <var>type</var> is of the form <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#external-types" id="ref-for-external-types①⓪">func</a> <var>functype</var></p>
<li data-md>
<p>"table" if <var>type</var> is of the form <a data-link-type="dfn" data-refhint-key="c47e6fe0" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#external-types" id="ref-for-external-types①①">table</a> <var>tabletype</var></p>
<li data-md>
<p>"memory" if <var>type</var> is of the form <a data-link-type="dfn" data-refhint-key="1fee0bd3" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#external-types" id="ref-for-external-types①②">mem</a> <var>memtype</var></p>
<li data-md>
<p>"global" if <var>type</var> is of the form <a data-link-type="dfn" data-refhint-key="de80bf22" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#external-types" id="ref-for-external-types①③">global</a> <var>globaltype</var></p>
<li data-md>
<p>"tag" if <var>type</var> is of the form <a data-link-type="dfn" data-refhint-key="9869f381" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#external-types" id="ref-for-external-types①④">tag</a> <var>tag</var></p>
</ul>
</div>
<div class="algorithm" data-algorithm="exports(moduleObject)" data-algorithm-for="Module">
The <dfn class="dfn-paneled idl-code" data-dfn-for="Module" data-dfn-type="method" data-export id="dom-module-exports"><code>exports(<var>moduleObject</var>)</code></dfn> method, when invoked, performs the following steps:
<ol>
<li data-md>
<p>Let <var>module</var> be <var>moduleObject</var>.[[Module]].</p>
<li data-md>
<p>Let <var>exports</var> be « ».</p>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate②">For each</a> (<var>name</var>, <var>type</var>) of <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-module-exports" id="ref-for-embed-module-exports①">module_exports</a>(<var>module</var>),</p>
<ol>
<li data-md>
<p>Let <var>kind</var> be the <a data-link-type="dfn" href="#string-value-of-the-extern-type" id="ref-for-string-value-of-the-extern-type">string value of the extern type</a> <var>type</var>.</p>
<li data-md>
<p>Let <var>obj</var> be «[ "<code class="idl"><a data-link-type="idl" href="#dom-moduleexportdescriptor-name" id="ref-for-dom-moduleexportdescriptor-name">name</a></code>" → <var>name</var>, "<code class="idl"><a data-link-type="idl" href="#dom-moduleexportdescriptor-kind" id="ref-for-dom-moduleexportdescriptor-kind">kind</a></code>" → <var>kind</var> ]».</p>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-append" id="ref-for-list-append⑤">Append</a> <var>obj</var> to <var>exports</var>.</p>
</ol>
<li data-md>
<p>Return <var>exports</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="imports(moduleObject)" data-algorithm-for="Module">
The <dfn class="dfn-paneled idl-code" data-dfn-for="Module" data-dfn-type="method" data-export id="dom-module-imports"><code>imports(<var>moduleObject</var>)</code></dfn> method, when invoked, performs the following steps:
<ol>
<li data-md>
<p>Let <var>module</var> be <var>moduleObject</var>.[[Module]].</p>
<li data-md>
<p>Let <var>imports</var> be « ».</p>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate③">For each</a> (<var>moduleName</var>, <var>name</var>, <var>type</var>) of <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-module-imports" id="ref-for-embed-module-imports①">module_imports</a>(<var>module</var>),</p>
<ol>
<li data-md>
<p>Let <var>kind</var> be the <a data-link-type="dfn" href="#string-value-of-the-extern-type" id="ref-for-string-value-of-the-extern-type①">string value of the extern type</a> <var>type</var>.</p>
<li data-md>
<p>Let <var>obj</var> be «[ "<code class="idl"><a data-link-type="idl" href="#dom-moduleimportdescriptor-module" id="ref-for-dom-moduleimportdescriptor-module">module</a></code>" → <var>moduleName</var>, "<code class="idl"><a data-link-type="idl" href="#dom-moduleimportdescriptor-name" id="ref-for-dom-moduleimportdescriptor-name">name</a></code>" → <var>name</var>, "<code class="idl"><a data-link-type="idl" href="#dom-moduleimportdescriptor-kind" id="ref-for-dom-moduleimportdescriptor-kind">kind</a></code>" → <var>kind</var> ]».</p>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-append" id="ref-for-list-append⑥">Append</a> <var>obj</var> to <var>imports</var>.</p>
</ol>
<li data-md>
<p>Return <var>imports</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="customSections(moduleObject, sectionName)" data-algorithm-for="Module">
The <dfn class="dfn-paneled idl-code" data-dfn-for="Module" data-dfn-type="method" data-export id="dom-module-customsections"><code>customSections(<var>moduleObject</var>, <var>sectionName</var>)</code></dfn> method, when invoked, performs the following steps:
<ol>
<li data-md>
<p>Let <var>bytes</var> be <var>moduleObject</var>.[[Bytes]].</p>
<li data-md>
<p>Let <var>customSections</var> be « ».</p>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate④">For each</a> <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/binary/modules.html#custom-section" id="ref-for-custom-section">custom section</a> <var>customSection</var> of <var>bytes</var>, interpreted according to the <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/binary/modules.html#binary-module" id="ref-for-binary-module">module grammar</a>,</p>
<ol>
<li data-md>
<p>Let <var>name</var> be the <code>name</code> of <var>customSection</var>, <a data-link-type="dfn" href="https://encoding.spec.whatwg.org/#utf-8-decode-without-bom-or-fail" id="ref-for-utf-8-decode-without-bom-or-fail">decoded as UTF-8</a>.</p>
<li data-md>
<p class="assertion">Assert: <var>name</var> is not failure (<var>moduleObject</var>.[[Module]] is <a data-link-type="dfn" data-refhint-key="526eaab3" href="https://webassembly.github.io/exception-handling/core/valid/modules.html#valid-module" id="ref-for-valid-module①">valid</a>).</p>
<li data-md>
<p>If <var>name</var> equals <var>sectionName</var> as string values,</p>
<ol>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-append" id="ref-for-list-append⑦">Append</a> a new <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-arraybuffer-objects" id="ref-for-sec-arraybuffer-objects①">ArrayBuffer</a></code> containing a copy of the bytes in <var>bytes</var> for the range matched by this <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/binary/modules.html#binary-customsec" id="ref-for-binary-customsec">customsec</a> production to <var>customSections</var>.</p>
</ol>
</ol>
<li data-md>
<p>Return <var>customSections</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="Module(bytes)" data-algorithm-for="Module">
The <dfn class="dfn-paneled idl-code" data-dfn-for="Module" data-dfn-type="constructor" data-export data-lt="Module(bytes)|constructor(bytes)" id="dom-module-module"><code>Module(<var>bytes</var>)</code></dfn> constructor, when invoked, performs the following steps:
<ol>
<li data-md>
<p>Let <var>stableBytes</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy" id="ref-for-dfn-get-buffer-source-copy③">copy of the bytes held by the buffer</a> <var>bytes</var>.</p>
<li data-md>
<p><a data-link-type="dfn" href="#compile-a-webassembly-module" id="ref-for-compile-a-webassembly-module②">Compile the WebAssembly module</a> <var>stableBytes</var> and store the result as <var>module</var>.</p>
<li data-md>
<p>If <var>module</var> is <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-error" id="ref-for-embed-error⑧">error</a>, throw a <code class="idl"><a data-link-type="idl" href="#exceptiondef-compileerror" id="ref-for-exceptiondef-compileerror①">CompileError</a></code> exception.</p>
<li data-md>
<p>Set <strong>this</strong>.[[Module]] to <var>module</var>.</p>
<li data-md>
<p>Set <strong>this</strong>.[[Bytes]] to <var>stableBytes</var>.</p>
</ol>
<p class="note" role="note"><span class="marker">Note:</span> Some implementations enforce a size limitation on <var>bytes</var>. Use of this API is discouraged, in favor of asynchronous APIs.</p>
</div>
<h3 class="heading settled" data-level="4.2" id="instances"><span class="secno">4.2. </span><span class="content">Instances</span><a class="self-link" href="#instances"></a></h3>
<pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNamespace" id="ref-for-LegacyNamespace①"><c- g>LegacyNamespace</c-></a>=<a data-link-type="idl-name" href="#namespacedef-webassembly" id="ref-for-namespacedef-webassembly①"><c- n>WebAssembly</c-></a>, Exposed=*]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="instance"><code><c- g>Instance</c-></code></dfn> {
<a class="idl-code" data-link-type="constructor" href="#dom-instance-instance" id="ref-for-dom-instance-instance"><c- g>constructor</c-></a>(<a data-link-type="idl-name" href="#module" id="ref-for-module①①"><c- n>Module</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="Instance/Instance(module, importObject), Instance/constructor(module, importObject), Instance/Instance(module), Instance/constructor(module)" data-dfn-type="argument" data-export id="dom-instance-instance-module-importobject-module"><code><c- g>module</c-></code></dfn>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-object" id="ref-for-idl-object②"><c- b>object</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="Instance/Instance(module, importObject), Instance/constructor(module, importObject), Instance/Instance(module), Instance/constructor(module)" data-dfn-type="argument" data-export id="dom-instance-instance-module-importobject-importobject"><code><c- g>importObject</c-></code></dfn>);
<c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-object" id="ref-for-idl-object③"><c- b>object</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="object" href="#dom-instance-exports" id="ref-for-dom-instance-exports"><c- g>exports</c-></a>;
};
</pre>
<div class="algorithm" data-algorithm="Instance(module, importObject)" data-algorithm-for="Instance">
The <dfn class="dfn-paneled idl-code" data-dfn-for="Instance" data-dfn-type="constructor" data-export data-lt="Instance(module, importObject)|constructor(module, importObject)|Instance(module)|constructor(module)" id="dom-instance-instance"><code>Instance(<var>module</var>, <var>importObject</var>)</code></dfn> constructor, when invoked, runs the following steps:
<ol>
<li data-md>
<p>Let <var>module</var> be <var>module</var>.[[Module]].</p>
<li data-md>
<p><a data-link-type="dfn" href="#read-the-imports" id="ref-for-read-the-imports②">Read the imports</a> of <var>module</var> with imports <var>importObject</var>, and let <var>imports</var> be the result.</p>
<li data-md>
<p><a data-link-type="dfn" href="#instantiate-the-core-of-a-webassembly-module" id="ref-for-instantiate-the-core-of-a-webassembly-module③">Instantiate the core of a WebAssembly module</a> <var>module</var> with <var>imports</var>, and let <var>instance</var> be the result.</p>
<li data-md>
<p><a data-link-type="dfn" href="#initialize-an-instance-object" id="ref-for-initialize-an-instance-object②">Initialize</a> <strong>this</strong> from <var>module</var> and <var>instance</var>.</p>
</ol>
<p class="note" role="note"><span class="marker">Note:</span> The use of this synchronous API is discouraged, as some implementations sometimes do long-running compilation work when instantiating.</p>
</div>
<div class="algorithm" data-algorithm="exports" data-algorithm-for="Instance">
The getter of the <dfn class="dfn-paneled idl-code" data-dfn-for="Instance" data-dfn-type="attribute" data-export id="dom-instance-exports"><code>exports</code></dfn> attribute of <code class="idl"><a data-link-type="idl" href="#instance" id="ref-for-instance④">Instance</a></code> returns <strong>this</strong>.[[Exports]].
</div>
<h3 class="heading settled" data-level="4.3" id="memories"><span class="secno">4.3. </span><span class="content">Memories</span><a class="self-link" href="#memories"></a></h3>
<pre class="idl highlight def"><c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-memorydescriptor"><code><c- g>MemoryDescriptor</c-></code></dfn> {
<c- b>required</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#EnforceRange" id="ref-for-EnforceRange"><c- g>EnforceRange</c-></a>] <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long" id="ref-for-idl-unsigned-long"><c- b>unsigned</c-> <c- b>long</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="MemoryDescriptor" data-dfn-type="dict-member" data-export data-type="unsigned long" id="dom-memorydescriptor-initial"><code><c- g>initial</c-></code></dfn>;
[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#EnforceRange" id="ref-for-EnforceRange①"><c- g>EnforceRange</c-></a>] <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long" id="ref-for-idl-unsigned-long①"><c- b>unsigned</c-> <c- b>long</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="MemoryDescriptor" data-dfn-type="dict-member" data-export data-type="unsigned long" id="dom-memorydescriptor-maximum"><code><c- g>maximum</c-></code></dfn>;
};
[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNamespace" id="ref-for-LegacyNamespace②"><c- g>LegacyNamespace</c-></a>=<a data-link-type="idl-name" href="#namespacedef-webassembly" id="ref-for-namespacedef-webassembly②"><c- n>WebAssembly</c-></a>, Exposed=*]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="memory"><code><c- g>Memory</c-></code></dfn> {
<a class="idl-code" data-link-type="constructor" href="#dom-memory-memory" id="ref-for-dom-memory-memory"><c- g>constructor</c-></a>(<a data-link-type="idl-name" href="#dictdef-memorydescriptor" id="ref-for-dictdef-memorydescriptor"><c- n>MemoryDescriptor</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="Memory/Memory(descriptor), Memory/constructor(descriptor)" data-dfn-type="argument" data-export id="dom-memory-memory-descriptor-descriptor"><code><c- g>descriptor</c-></code></dfn>);
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long" id="ref-for-idl-unsigned-long②"><c- b>unsigned</c-> <c- b>long</c-></a> <a class="idl-code" data-link-type="method" href="#dom-memory-grow" id="ref-for-dom-memory-grow"><c- g>grow</c-></a>([<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#EnforceRange" id="ref-for-EnforceRange②"><c- g>EnforceRange</c-></a>] <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long" id="ref-for-idl-unsigned-long③"><c- b>unsigned</c-> <c- b>long</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="Memory/grow(delta)" data-dfn-type="argument" data-export id="dom-memory-grow-delta-delta"><code><c- g>delta</c-></code></dfn>);
<c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://tc39.github.io/ecma262/#sec-arraybuffer-objects" id="ref-for-sec-arraybuffer-objects②"><c- b>ArrayBuffer</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="ArrayBuffer" href="#dom-memory-buffer" id="ref-for-dom-memory-buffer"><c- g>buffer</c-></a>;
};
</pre>
<p>A <code class="idl"><a data-link-type="idl" href="#memory" id="ref-for-memory③">Memory</a></code> object represents a single <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#memory-instances" id="ref-for-memory-instances①">memory instance</a>
which can be simultaneously referenced by multiple <code class="idl"><a data-link-type="idl" href="#instance" id="ref-for-instance⑤">Instance</a></code> objects. Each
<code class="idl"><a data-link-type="idl" href="#memory" id="ref-for-memory④">Memory</a></code> object has the following internal slots:</p>
<ul>
<li data-md>
<p>[[Memory]] : a <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-memaddr" id="ref-for-syntax-memaddr①">memory address</a></p>
<li data-md>
<p>[[BufferObject]] : an <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-arraybuffer-objects" id="ref-for-sec-arraybuffer-objects③">ArrayBuffer</a></code> whose <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/ecmascript-data-types-and-values.html#sec-data-blocks" id="ref-for-sec-data-blocks①">Data Block</a> is <a data-link-type="dfn" href="#identified-with" id="ref-for-identified-with">identified with</a> the above memory address</p>
</ul>
<div class="algorithm" data-algorithm="create a memory buffer">
To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="create-a-memory-buffer">create a memory buffer</dfn> from a <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-memaddr" id="ref-for-syntax-memaddr②">memory address</a> <var>memaddr</var>, perform the following steps:
<ol>
<li data-md>
<p>Let <var>block</var> be a <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/ecmascript-data-types-and-values.html#sec-data-blocks" id="ref-for-sec-data-blocks②">Data Block</a> which is <a data-link-type="dfn" href="#identified-with" id="ref-for-identified-with①">identified with</a> the underlying memory of <var>memaddr</var>.</p>
<li data-md>
<p>Let <var>buffer</var> be a new <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-arraybuffer-objects" id="ref-for-sec-arraybuffer-objects④">ArrayBuffer</a></code> whose [[ArrayBufferData]] is <var>block</var> and [[ArrayBufferByteLength]] is set to the length of <var>block</var>.</p>
<li data-md>
<p>Set <var>buffer</var>.[[ArrayBufferDetachKey]] to "WebAssembly.Memory".</p>
<li data-md>
<p>Return <var>buffer</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="initialize a memory object">
To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="initialize-a-memory-object">initialize a memory object</dfn> <var>memory</var> from a <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-memaddr" id="ref-for-syntax-memaddr③">memory address</a> <var>memaddr</var>, perform the following steps:
<ol>
<li data-md>
<p>Let <var>map</var> be the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent④">surrounding agent</a>’s associated <a data-link-type="dfn" href="#memory-object-cache" id="ref-for-memory-object-cache">Memory object cache</a>.</p>
<li data-md>
<p class="assertion">Assert: <var>map</var>[<var>memaddr</var>] doesn’t <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#map-exists" id="ref-for-map-exists">exist</a>.</p>
<li data-md>
<p>Let <var>buffer</var> be the result of <a data-link-type="dfn" href="#create-a-memory-buffer" id="ref-for-create-a-memory-buffer">creating a memory buffer</a> from <var>memaddr</var>.</p>
<li data-md>
<p>Set <var>memory</var>.[[Memory]] to <var>memaddr</var>.</p>
<li data-md>
<p>Set <var>memory</var>.[[BufferObject]] to <var>buffer</var>.</p>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#map-set" id="ref-for-map-set">Set</a> <var>map</var>[<var>memaddr</var>] to <var>memory</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="create a memory object">
To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="create-a-memory-object">create a memory object</dfn> from a <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-memaddr" id="ref-for-syntax-memaddr④">memory address</a> <var>memaddr</var>, perform the following steps:
<ol>
<li data-md>
<p>Let <var>map</var> be the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent⑤">surrounding agent</a>’s associated <a data-link-type="dfn" href="#memory-object-cache" id="ref-for-memory-object-cache①">Memory object cache</a>.</p>
<li data-md>
<p>If <var>map</var>[<var>memaddr</var>] <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#map-exists" id="ref-for-map-exists①">exists</a>,</p>
<ol>
<li data-md>
<p>Return <var>map</var>[<var>memaddr</var>].</p>
</ol>
<li data-md>
<p>Let <var>memory</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new②">new</a> <code class="idl"><a data-link-type="idl" href="#memory" id="ref-for-memory⑤">Memory</a></code>.</p>
<li data-md>
<p><a data-link-type="dfn" href="#initialize-a-memory-object" id="ref-for-initialize-a-memory-object">Initialize</a> <var>memory</var> from <var>memaddr</var>.</p>
<li data-md>
<p>Return <var>memory</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="Memory(descriptor)" data-algorithm-for="Memory">
The <dfn class="dfn-paneled idl-code" data-dfn-for="Memory" data-dfn-type="constructor" data-export data-lt="Memory(descriptor)|constructor(descriptor)" id="dom-memory-memory"><code>Memory(<var>descriptor</var>)</code></dfn> constructor, when invoked, performs the following steps:
<ol>
<li data-md>
<p>Let <var>initial</var> be <var>descriptor</var>["initial"].</p>
<li data-md>
<p>If <var>descriptor</var>["maximum"] <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#map-exists" id="ref-for-map-exists②">exists</a>, let <var>maximum</var> be <var>descriptor</var>["maximum"]; otherwise, let <var>maximum</var> be empty.</p>
<li data-md>
<p>If <var>maximum</var> is not empty and <var>maximum</var> &lt; <var>initial</var>, throw a <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-rangeerror" id="ref-for-sec-native-error-types-used-in-this-standard-rangeerror">RangeError</a></code> exception.</p>
<li data-md>
<p>Let <var>memtype</var> be { min <var>initial</var>, max <var>maximum</var> }.</p>
<li data-md>
<p>Let <var>store</var> be the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent⑥">surrounding agent</a>’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store④">associated store</a>.</p>
<li data-md>
<p>Let (<var>store</var>, <var>memaddr</var>) be <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-mem-alloc" id="ref-for-embed-mem-alloc">mem_alloc</a>(<var>store</var>, <var>memtype</var>). If allocation fails, throw a <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-rangeerror" id="ref-for-sec-native-error-types-used-in-this-standard-rangeerror①">RangeError</a></code> exception.</p>
<li data-md>
<p>Set the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent⑦">surrounding agent</a>’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store⑤">associated store</a> to <var>store</var>.</p>
<li data-md>
<p><a data-link-type="dfn" href="#initialize-a-memory-object" id="ref-for-initialize-a-memory-object①">Initialize</a> <strong>this</strong> from <var>memaddr</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="reset the Memory buffer">
To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="reset-the-memory-buffer">reset the Memory buffer</dfn> of <var>memaddr</var>, perform the following steps:
<ol>
<li data-md>
<p>Let <var>map</var> be the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent⑧">surrounding agent</a>’s associated <a data-link-type="dfn" href="#memory-object-cache" id="ref-for-memory-object-cache②">Memory object cache</a>.</p>
<li data-md>
<p class="assertion">Assert: <var>map</var>[<var>memaddr</var>] <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#map-exists" id="ref-for-map-exists③">exists</a>.</p>
<li data-md>
<p>Let <var>memory</var> be <var>map</var>[<var>memaddr</var>].</p>
<li data-md>
<p>Perform <a data-link-type="dfn" data-refhint-key="f4fa6c3b" href="https://tc39.github.io/ecma262/#sec-returnifabrupt-shorthands" id="ref-for-sec-returnifabrupt-shorthands⑤">!</a> <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/structured-data.html#sec-detacharraybuffer" id="ref-for-sec-detacharraybuffer">DetachArrayBuffer</a>(<var>memory</var>.[[BufferObject]], "WebAssembly.Memory").</p>
<li data-md>
<p>Let <var>buffer</var> be the result of <a data-link-type="dfn" href="#create-a-memory-buffer" id="ref-for-create-a-memory-buffer①">creating a memory buffer</a> from <var>memaddr</var>.</p>
<li data-md>
<p>Set <var>memory</var>.[[BufferObject]] to <var>buffer</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="dom-Memory-grow">
The <dfn class="dfn-paneled idl-code" data-dfn-for="Memory" data-dfn-type="method" data-export id="dom-memory-grow"><code>grow(<var>delta</var>)</code></dfn> method, when invoked, performs the following steps:
<ol>
<li data-md>
<p>Let <var>store</var> be the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent⑨">surrounding agent</a>’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store⑥">associated store</a>.</p>
<li data-md>
<p>Let <var>memaddr</var> be <strong>this</strong>.[[Memory]].</p>
<li data-md>
<p>Let <var>ret</var> be the <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-mem-size" id="ref-for-embed-mem-size">mem_size</a>(<var>store</var>, <var>memaddr</var>).</p>
<li data-md>
<p>Let <var>store</var> be <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-mem-grow" id="ref-for-embed-mem-grow">mem_grow</a>(<var>store</var>, <var>memaddr</var>, <var>delta</var>).</p>
<li data-md>
<p>If <var>store</var> is <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-error" id="ref-for-embed-error⑨">error</a>, throw a <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-rangeerror" id="ref-for-sec-native-error-types-used-in-this-standard-rangeerror②">RangeError</a></code> exception.</p>
<li data-md>
<p>Set the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent①⓪">surrounding agent</a>’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store⑦">associated store</a> to <var>store</var>.</p>
<li data-md>
<p><a data-link-type="dfn" href="#reset-the-memory-buffer" id="ref-for-reset-the-memory-buffer">Reset the memory buffer</a> of <var>memaddr</var>.</p>
<li data-md>
<p>Return <var>ret</var>.</p>
</ol>
</div>
<p>Immediately after a WebAssembly <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/instructions.html#exec-memory-grow" id="ref-for-exec-memory-grow">memory.grow</a> instruction executes, perform the following steps:</p>
<div class="algorithm" data-algorithm="memory.grow">
<ol>
<li data-md>
<p>If the top of the stack is not <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#values" id="ref-for-values">i32.const</a> (−1),</p>
<ol>
<li data-md>
<p>Let <var>frame</var> be the <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/conventions.html#exec-notation-textual" id="ref-for-exec-notation-textual">current frame</a>.</p>
<li data-md>
<p class="assertion">Assert: due to validation, <var>frame</var>.<a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-frame" id="ref-for-syntax-frame">module</a>.<a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-moduleinst" id="ref-for-syntax-moduleinst">memaddrs</a>[0] exists.</p>
<li data-md>
<p>Let <var>memaddr</var> be the memory address <var>frame</var>.<a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-frame" id="ref-for-syntax-frame①">module</a>.<a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-moduleinst" id="ref-for-syntax-moduleinst①">memaddrs</a>[0].</p>
<li data-md>
<p><a data-link-type="dfn" href="#reset-the-memory-buffer" id="ref-for-reset-the-memory-buffer①">Reset the memory buffer</a> of <var>memaddr</var>.</p>
</ol>
</ol>
</div>
<div class="algorithm" data-algorithm="buffer" data-algorithm-for="Memory">
The getter of the <dfn class="dfn-paneled idl-code" data-dfn-for="Memory" data-dfn-type="attribute" data-export id="dom-memory-buffer"><code>buffer</code></dfn> attribute of <code class="idl"><a data-link-type="idl" href="#memory" id="ref-for-memory⑥">Memory</a></code> returns <strong>this</strong>.[[BufferObject]].
</div>
<h3 class="heading settled" data-level="4.4" id="tables"><span class="secno">4.4. </span><span class="content">Tables</span><a class="self-link" href="#tables"></a></h3>
<pre class="idl highlight def"><c- b>enum</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="enum" data-export id="enumdef-tablekind"><code><c- g>TableKind</c-></code></dfn> {
<dfn class="dfn-paneled idl-code" data-dfn-for="TableKind" data-dfn-type="enum-value" data-export id="dom-tablekind-externref"><code><c- s>"externref"</c-></code></dfn>,
<dfn class="dfn-paneled idl-code" data-dfn-for="TableKind" data-dfn-type="enum-value" data-export id="dom-tablekind-anyfunc"><code><c- s>"anyfunc"</c-></code></dfn>,
// Note: More values may be added in future iterations,
// e.g., typed function references, typed GC references
};
<c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-tabledescriptor"><code><c- g>TableDescriptor</c-></code></dfn> {
<c- b>required</c-> <a data-link-type="idl-name" href="#enumdef-tablekind" id="ref-for-enumdef-tablekind"><c- n>TableKind</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="TableDescriptor" data-dfn-type="dict-member" data-export data-type="TableKind" id="dom-tabledescriptor-element"><code><c- g>element</c-></code></dfn>;
<c- b>required</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#EnforceRange" id="ref-for-EnforceRange③"><c- g>EnforceRange</c-></a>] <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long" id="ref-for-idl-unsigned-long④"><c- b>unsigned</c-> <c- b>long</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="TableDescriptor" data-dfn-type="dict-member" data-export data-type="unsigned long" id="dom-tabledescriptor-initial"><code><c- g>initial</c-></code></dfn>;
[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#EnforceRange" id="ref-for-EnforceRange④"><c- g>EnforceRange</c-></a>] <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long" id="ref-for-idl-unsigned-long⑤"><c- b>unsigned</c-> <c- b>long</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="TableDescriptor" data-dfn-type="dict-member" data-export data-type="unsigned long" id="dom-tabledescriptor-maximum"><code><c- g>maximum</c-></code></dfn>;
};
[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNamespace" id="ref-for-LegacyNamespace③"><c- g>LegacyNamespace</c-></a>=<a data-link-type="idl-name" href="#namespacedef-webassembly" id="ref-for-namespacedef-webassembly③"><c- n>WebAssembly</c-></a>, Exposed=*]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="table"><code><c- g>Table</c-></code></dfn> {
<a class="idl-code" data-link-type="constructor" href="#dom-table-table" id="ref-for-dom-table-table"><c- g>constructor</c-></a>(<a data-link-type="idl-name" href="#dictdef-tabledescriptor" id="ref-for-dictdef-tabledescriptor"><c- n>TableDescriptor</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="Table/Table(descriptor, value), Table/constructor(descriptor, value), Table/Table(descriptor), Table/constructor(descriptor)" data-dfn-type="argument" data-export id="dom-table-table-descriptor-value-descriptor"><code><c- g>descriptor</c-></code></dfn>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="Table/Table(descriptor, value), Table/constructor(descriptor, value), Table/Table(descriptor), Table/constructor(descriptor)" data-dfn-type="argument" data-export id="dom-table-table-descriptor-value-value"><code><c- g>value</c-></code></dfn>);
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long" id="ref-for-idl-unsigned-long⑥"><c- b>unsigned</c-> <c- b>long</c-></a> <a class="idl-code" data-link-type="method" href="#dom-table-grow" id="ref-for-dom-table-grow"><c- g>grow</c-></a>([<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#EnforceRange" id="ref-for-EnforceRange⑤"><c- g>EnforceRange</c-></a>] <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long" id="ref-for-idl-unsigned-long⑦"><c- b>unsigned</c-> <c- b>long</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="Table/grow(delta, value), Table/grow(delta)" data-dfn-type="argument" data-export id="dom-table-grow-delta-value-delta"><code><c- g>delta</c-></code></dfn>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any①"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="Table/grow(delta, value), Table/grow(delta)" data-dfn-type="argument" data-export id="dom-table-grow-delta-value-value"><code><c- g>value</c-></code></dfn>);
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any②"><c- b>any</c-></a> <a class="idl-code" data-link-type="method" href="#dom-table-get" id="ref-for-dom-table-get"><c- g>get</c-></a>([<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#EnforceRange" id="ref-for-EnforceRange⑥"><c- g>EnforceRange</c-></a>] <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long" id="ref-for-idl-unsigned-long⑧"><c- b>unsigned</c-> <c- b>long</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="Table/get(index)" data-dfn-type="argument" data-export id="dom-table-get-index-index"><code><c- g>index</c-></code></dfn>);
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-undefined" id="ref-for-idl-undefined"><c- b>undefined</c-></a> <a class="idl-code" data-link-type="method" href="#dom-table-set" id="ref-for-dom-table-set"><c- g>set</c-></a>([<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#EnforceRange" id="ref-for-EnforceRange⑦"><c- g>EnforceRange</c-></a>] <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long" id="ref-for-idl-unsigned-long⑨"><c- b>unsigned</c-> <c- b>long</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="Table/set(index, value), Table/set(index)" data-dfn-type="argument" data-export id="dom-table-set-index-value-index"><code><c- g>index</c-></code></dfn>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any③"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="Table/set(index, value), Table/set(index)" data-dfn-type="argument" data-export id="dom-table-set-index-value-value"><code><c- g>value</c-></code></dfn>);
<c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long" id="ref-for-idl-unsigned-long①⓪"><c- b>unsigned</c-> <c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="unsigned long" href="#dom-table-length" id="ref-for-dom-table-length"><c- g>length</c-></a>;
};
</pre>
<p>A <code class="idl"><a data-link-type="idl" href="#table" id="ref-for-table②">Table</a></code> object represents a single <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#table-instances" id="ref-for-table-instances">table instance</a> which can be simultaneously referenced by
multiple <code class="idl"><a data-link-type="idl" href="#instance" id="ref-for-instance⑥">Instance</a></code> objects.
Each <code class="idl"><a data-link-type="idl" href="#table" id="ref-for-table③">Table</a></code> object has a [[Table]] internal slot, which is a <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-tableaddr" id="ref-for-syntax-tableaddr①">table address</a>.</p>
<div class="algorithm" data-algorithm="initialize a table object">
To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="initialize-a-table-object">initialize a table object</dfn> <var>table</var> from a <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-tableaddr" id="ref-for-syntax-tableaddr②">table address</a> <var>tableaddr</var>, perform the following steps:
<ol>
<li data-md>
<p>Let <var>map</var> be the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent①①">surrounding agent</a>’s associated <a data-link-type="dfn" href="#table-object-cache" id="ref-for-table-object-cache">Table object cache</a>.</p>
<li data-md>
<p class="assertion">Assert: <var>map</var>[<var>tableaddr</var>] doesn’t <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#map-exists" id="ref-for-map-exists④">exist</a>.</p>
<li data-md>
<p>Set <var>table</var>.[[Table]] to <var>tableaddr</var>.</p>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#map-set" id="ref-for-map-set①">Set</a> <var>map</var>[<var>tableaddr</var>] to <var>table</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="create a table object">
To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="create-a-table-object">create a table object</dfn> from a <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-tableaddr" id="ref-for-syntax-tableaddr③">table address</a> <var>tableaddr</var>, perform the following steps:
<ol>
<li data-md>
<p>Let <var>map</var> be the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent①②">surrounding agent</a>’s associated <a data-link-type="dfn" href="#table-object-cache" id="ref-for-table-object-cache①">Table object cache</a>.</p>
<li data-md>
<p>If <var>map</var>[<var>tableaddr</var>] <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#map-exists" id="ref-for-map-exists⑤">exists</a>,</p>
<ol>
<li data-md>
<p>Return <var>map</var>[<var>tableaddr</var>].</p>
</ol>
<li data-md>
<p>Let <var>table</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new③">new</a> <code class="idl"><a data-link-type="idl" href="#table" id="ref-for-table④">Table</a></code>.</p>
<li data-md>
<p><a data-link-type="dfn" href="#initialize-a-table-object" id="ref-for-initialize-a-table-object">Initialize</a> <var>table</var> from <var>tableaddr</var>.</p>
<li data-md>
<p>Return <var>table</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="Table(descriptor, value)" data-algorithm-for="Table">
The <dfn class="dfn-paneled idl-code" data-dfn-for="Table" data-dfn-type="constructor" data-export data-lt="Table(descriptor, value)|constructor(descriptor, value)|Table(descriptor)|constructor(descriptor)" id="dom-table-table"><code>Table(<var>descriptor</var>, <var>value</var>)</code></dfn> constructor, when invoked, performs the following steps:
<ol>
<li data-md>
<p>Let <var>elementType</var> be <a data-link-type="dfn" href="#tovaluetype" id="ref-for-tovaluetype">ToValueType</a>(<var>descriptor</var>["element"]).</p>
<li data-md>
<p>If <var>elementType</var> is not a <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-reftype" id="ref-for-syntax-reftype">reftype</a>,</p>
<ol>
<li data-md>
<p><a data-link-type="dfn" href="#webassembly-throw" id="ref-for-webassembly-throw">Throw</a> a <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-typeerror" id="ref-for-sec-native-error-types-used-in-this-standard-typeerror②">TypeError</a></code> exception.</p>
</ol>
<li data-md>
<p>Let <var>initial</var> be <var>descriptor</var>["initial"].</p>
<li data-md>
<p>If <var>descriptor</var>["maximum"] <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#map-exists" id="ref-for-map-exists⑥">exists</a>, let <var>maximum</var> be <var>descriptor</var>["maximum"]; otherwise, let <var>maximum</var> be empty.</p>
<li data-md>
<p>If <var>maximum</var> is not empty and <var>maximum</var> &lt; <var>initial</var>, throw a <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-rangeerror" id="ref-for-sec-native-error-types-used-in-this-standard-rangeerror③">RangeError</a></code> exception.</p>
<li data-md>
<p>If <var>value</var> is missing,</p>
<ol>
<li data-md>
<p>Let <var>ref</var> be <a data-link-type="dfn" href="#defaultvalue" id="ref-for-defaultvalue">DefaultValue</a>(<var>elementType</var>).</p>
</ol>
<li data-md>
<p>Otherwise,</p>
<ol>
<li data-md>
<p>Let <var>ref</var> be <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-returnifabrupt-shorthands" id="ref-for-sec-returnifabrupt-shorthands⑥">?</a> <a data-link-type="dfn" href="#towebassemblyvalue" id="ref-for-towebassemblyvalue①">ToWebAssemblyValue</a>(<var>value</var>, <var>elementType</var>).</p>
</ol>
<li data-md>
<p>Let <var>type</var> be the <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-tabletype" id="ref-for-syntax-tabletype">table type</a> {<a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-tabletype" id="ref-for-syntax-tabletype①">min</a> <var>initial</var>, <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-tabletype" id="ref-for-syntax-tabletype②">max</a> <var>maximum</var>} <var>elementType</var>.</p>
<li data-md>
<p>Let <var>store</var> be the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent①③">surrounding agent</a>’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store⑧">associated store</a>.</p>
<li data-md>
<p>Let (<var>store</var>, <var>tableaddr</var>) be <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-table-alloc" id="ref-for-embed-table-alloc">table_alloc</a>(<var>store</var>, <var>type</var>, <var>ref</var>). </p>
<li data-md>
<p>Set the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent①④">surrounding agent</a>’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store⑨">associated store</a> to <var>store</var>.</p>
<li data-md>
<p><a data-link-type="dfn" href="#initialize-a-table-object" id="ref-for-initialize-a-table-object①">Initialize</a> <strong>this</strong> from <var>tableaddr</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="dom-Table-grow">
The <dfn class="dfn-paneled idl-code" data-dfn-for="Table" data-dfn-type="method" data-export data-lt="grow(delta, value)|grow(delta)" id="dom-table-grow"><code>grow(<var>delta</var>, <var>value</var>)</code></dfn> method, when invoked, performs the following steps:
<ol>
<li data-md>
<p>Let <var>tableaddr</var> be <strong>this</strong>.[[Table]].</p>
<li data-md>
<p>Let <var>store</var> be the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent①⑤">surrounding agent</a>’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store①⓪">associated store</a>.</p>
<li data-md>
<p>Let <var>initialSize</var> be <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-table-size" id="ref-for-embed-table-size">table_size</a>(<var>store</var>, <var>tableaddr</var>).</p>
<li data-md>
<p>Let (<var>limits</var>, <var>elementType</var>) be <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-table-type" id="ref-for-embed-table-type">table_type</a>(<var>tableaddr</var>).</p>
<li data-md>
<p>If <var>value</var> is missing,</p>
<ol>
<li data-md>
<p>Let <var>ref</var> be <a data-link-type="dfn" href="#defaultvalue" id="ref-for-defaultvalue①">DefaultValue</a>(<var>elementType</var>).</p>
</ol>
<li data-md>
<p>Otherwise,</p>
<ol>
<li data-md>
<p>Let <var>ref</var> be <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-returnifabrupt-shorthands" id="ref-for-sec-returnifabrupt-shorthands⑦">?</a> <a data-link-type="dfn" href="#towebassemblyvalue" id="ref-for-towebassemblyvalue②">ToWebAssemblyValue</a>(<var>value</var>, <var>elementType</var>).</p>
</ol>
<li data-md>
<p>Let <var>result</var> be <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-table-grow" id="ref-for-embed-table-grow">table_grow</a>(<var>store</var>, <var>tableaddr</var>, <var>delta</var>, <var>ref</var>).</p>
<li data-md>
<p>If <var>result</var> is <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-error" id="ref-for-embed-error①⓪">error</a>, throw a <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-rangeerror" id="ref-for-sec-native-error-types-used-in-this-standard-rangeerror④">RangeError</a></code> exception.</p>
<p class="note" role="note"><span class="marker">Note:</span> The above exception can happen due to either insufficient memory or an invalid size parameter.</p>
<li data-md>
<p>Set the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent①⑥">surrounding agent</a>’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store①①">associated store</a> to <var>result</var>.</p>
<li data-md>
<p>Return <var>initialSize</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="length" data-algorithm-for="Table">
The getter of the <dfn class="dfn-paneled idl-code" data-dfn-for="Table" data-dfn-type="attribute" data-export id="dom-table-length"><code>length</code></dfn> attribute of <code class="idl"><a data-link-type="idl" href="#table" id="ref-for-table⑤">Table</a></code>, when invoked, performs the following steps:
<ol>
<li data-md>
<p>Let <var>tableaddr</var> be <strong>this</strong>.[[Table]].</p>
<li data-md>
<p>Let <var>store</var> be the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent①⑦">surrounding agent</a>’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store①②">associated store</a>.</p>
<li data-md>
<p>Return <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-table-size" id="ref-for-embed-table-size①">table_size</a>(<var>store</var>, <var>tableaddr</var>).</p>
</ol>
</div>
<div class="algorithm" data-algorithm="get(index)" data-algorithm-for="Table">
The <dfn class="dfn-paneled idl-code" data-dfn-for="Table" data-dfn-type="method" data-export id="dom-table-get"><code>get(<var>index</var>)</code></dfn> method, when invoked, performs the following steps:
<ol>
<li data-md>
<p>Let <var>tableaddr</var> be <strong>this</strong>.[[Table]].</p>
<li data-md>
<p>Let <var>store</var> be the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent①⑧">surrounding agent</a>’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store①③">associated store</a>.</p>
<li data-md>
<p>Let <var>result</var> be <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-table-read" id="ref-for-embed-table-read">table_read</a>(<var>store</var>, <var>tableaddr</var>, <var>index</var>).</p>
<li data-md>
<p>If <var>result</var> is <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-error" id="ref-for-embed-error①①">error</a>, throw a <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-rangeerror" id="ref-for-sec-native-error-types-used-in-this-standard-rangeerror⑤">RangeError</a></code> exception.</p>
<li data-md>
<p>Return <a data-link-type="dfn" href="#tojsvalue" id="ref-for-tojsvalue">ToJSValue</a>(<var>result</var>).</p>
</ol>
</div>
<div class="algorithm" data-algorithm="set(index, value)" data-algorithm-for="Table">
The <dfn class="dfn-paneled idl-code" data-dfn-for="Table" data-dfn-type="method" data-export data-lt="set(index, value)|set(index)" id="dom-table-set"><code>set(<var>index</var>, <var>value</var>)</code></dfn> method, when invoked, performs the following steps:
<ol>
<li data-md>
<p>Let <var>tableaddr</var> be <strong>this</strong>.[[Table]].</p>
<li data-md>
<p>Let (<var>limits</var>, <var>elementType</var>) be <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-table-type" id="ref-for-embed-table-type①">table_type</a>(<var>tableaddr</var>).</p>
<li data-md>
<p>If <var>value</var> is missing,</p>
<ol>
<li data-md>
<p>Let <var>ref</var> be <a data-link-type="dfn" href="#defaultvalue" id="ref-for-defaultvalue②">DefaultValue</a>(<var>elementType</var>).</p>
</ol>
<li data-md>
<p>Otherwise,</p>
<ol>
<li data-md>
<p>Let <var>ref</var> be <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-returnifabrupt-shorthands" id="ref-for-sec-returnifabrupt-shorthands⑧">?</a> <a data-link-type="dfn" href="#towebassemblyvalue" id="ref-for-towebassemblyvalue③">ToWebAssemblyValue</a>(<var>value</var>, <var>elementType</var>).</p>
</ol>
<li data-md>
<p>Let <var>store</var> be the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent①⑨">surrounding agent</a>’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store①④">associated store</a>.</p>
<li data-md>
<p>Let <var>store</var> be <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-table-write" id="ref-for-embed-table-write">table_write</a>(<var>store</var>, <var>tableaddr</var>, <var>index</var>, <var>ref</var>).</p>
<li data-md>
<p>If <var>store</var> is <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-error" id="ref-for-embed-error①②">error</a>, throw a <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-rangeerror" id="ref-for-sec-native-error-types-used-in-this-standard-rangeerror⑥">RangeError</a></code> exception.</p>
<li data-md>
<p>Set the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent②⓪">surrounding agent</a>’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store①⑤">associated store</a> to <var>store</var>.</p>
</ol>
</div>
<h3 class="heading settled" data-level="4.5" id="globals"><span class="secno">4.5. </span><span class="content">Globals</span><a class="self-link" href="#globals"></a></h3>
<pre class="idl highlight def"><c- b>enum</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="enum" data-export id="enumdef-valuetype"><code><c- g>ValueType</c-></code></dfn> {
<dfn class="dfn-paneled idl-code" data-dfn-for="ValueType" data-dfn-type="enum-value" data-export id="dom-valuetype-i32"><code><c- s>"i32"</c-></code></dfn>,
<dfn class="dfn-paneled idl-code" data-dfn-for="ValueType" data-dfn-type="enum-value" data-export id="dom-valuetype-i64"><code><c- s>"i64"</c-></code></dfn>,
<dfn class="dfn-paneled idl-code" data-dfn-for="ValueType" data-dfn-type="enum-value" data-export id="dom-valuetype-f32"><code><c- s>"f32"</c-></code></dfn>,
<dfn class="dfn-paneled idl-code" data-dfn-for="ValueType" data-dfn-type="enum-value" data-export id="dom-valuetype-f64"><code><c- s>"f64"</c-></code></dfn>,
<dfn class="dfn-paneled idl-code" data-dfn-for="ValueType" data-dfn-type="enum-value" data-export id="dom-valuetype-v128"><code><c- s>"v128"</c-></code></dfn>,
<dfn class="dfn-paneled idl-code" data-dfn-for="ValueType" data-dfn-type="enum-value" data-export id="dom-valuetype-externref"><code><c- s>"externref"</c-></code></dfn>,
<dfn class="dfn-paneled idl-code" data-dfn-for="ValueType" data-dfn-type="enum-value" data-export id="dom-valuetype-anyfunc"><code><c- s>"anyfunc"</c-></code></dfn>,
};
</pre>
<p class="note" role="note"><span class="marker">Note:</span> this type may be extended with additional cases in future versions of WebAssembly.</p>
<pre class="idl highlight def"><c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-globaldescriptor"><code><c- g>GlobalDescriptor</c-></code></dfn> {
<c- b>required</c-> <a data-link-type="idl-name" href="#enumdef-valuetype" id="ref-for-enumdef-valuetype"><c- n>ValueType</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="GlobalDescriptor" data-dfn-type="dict-member" data-export data-type="ValueType" id="dom-globaldescriptor-value"><code><c- g>value</c-></code></dfn>;
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean" id="ref-for-idl-boolean①"><c- b>boolean</c-></a> <dfn class="dfn-paneled idl-code" data-default="false" data-dfn-for="GlobalDescriptor" data-dfn-type="dict-member" data-export data-type="boolean" id="dom-globaldescriptor-mutable"><code><c- g>mutable</c-></code></dfn> = <c- b>false</c->;
};
[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNamespace" id="ref-for-LegacyNamespace④"><c- g>LegacyNamespace</c-></a>=<a data-link-type="idl-name" href="#namespacedef-webassembly" id="ref-for-namespacedef-webassembly④"><c- n>WebAssembly</c-></a>, Exposed=*]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="global"><code><c- g>Global</c-></code></dfn> {
<a class="idl-code" data-link-type="constructor" href="#dom-global-global" id="ref-for-dom-global-global"><c- g>constructor</c-></a>(<a data-link-type="idl-name" href="#dictdef-globaldescriptor" id="ref-for-dictdef-globaldescriptor"><c- n>GlobalDescriptor</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="Global/Global(descriptor, v), Global/constructor(descriptor, v), Global/Global(descriptor), Global/constructor(descriptor)" data-dfn-type="argument" data-export id="dom-global-global-descriptor-v-descriptor"><code><c- g>descriptor</c-></code></dfn>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any④"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="Global/Global(descriptor, v), Global/constructor(descriptor, v), Global/Global(descriptor), Global/constructor(descriptor)" data-dfn-type="argument" data-export id="dom-global-global-descriptor-v-v"><code><c- g>v</c-></code></dfn>);
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any⑤"><c- b>any</c-></a> <a class="idl-code" data-link-type="method" href="#dom-global-valueof" id="ref-for-dom-global-valueof"><c- g>valueOf</c-></a>();
<c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any⑥"><c- b>any</c-></a> <a class="idl-code" data-link-type="attribute" data-type="any" href="#dom-global-value" id="ref-for-dom-global-value"><c- g>value</c-></a>;
};
</pre>
<p>A <code class="idl"><a data-link-type="idl" href="#global" id="ref-for-global②">Global</a></code> object represents a single <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#global-instances" id="ref-for-global-instances">global instance</a>
which can be simultaneously referenced by multiple <code class="idl"><a data-link-type="idl" href="#instance" id="ref-for-instance⑦">Instance</a></code> objects. Each
<code class="idl"><a data-link-type="idl" href="#global" id="ref-for-global③">Global</a></code> object has one internal slot:</p>
<ul>
<li data-md>
<p>[[Global]] : a <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-globaladdr" id="ref-for-syntax-globaladdr①">global address</a></p>
</ul>
<div class="algorithm" data-algorithm="initialize a global object">
To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="initialize-a-global-object">initialize a global object</dfn> <var>global</var> from a <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-globaladdr" id="ref-for-syntax-globaladdr②">global address</a> <var>globaladdr</var>, perform the following steps:
<ol>
<li data-md>
<p>Let <var>map</var> be the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent②①">surrounding agent</a>’s associated <a data-link-type="dfn" href="#global-object-cache" id="ref-for-global-object-cache">Global object cache</a>.</p>
<li data-md>
<p class="assertion">Assert: <var>map</var>[<var>globaladdr</var>] doesn’t <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#map-exists" id="ref-for-map-exists⑦">exist</a>.</p>
<li data-md>
<p>Set <var>global</var>.[[Global]] to <var>globaladdr</var>.</p>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#map-set" id="ref-for-map-set②">Set</a> <var>map</var>[<var>globaladdr</var>] to <var>global</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="create a global object">
To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="create-a-global-object">create a global object</dfn> from a <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-globaladdr" id="ref-for-syntax-globaladdr③">global address</a> <var>globaladdr</var>, perform the following steps:
<ol>
<li data-md>
<p>Let <var>map</var> be the current <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#realm&apos;s-agent" id="ref-for-realm&apos;s-agent③">agent</a>’s associated <a data-link-type="dfn" href="#global-object-cache" id="ref-for-global-object-cache①">Global object cache</a>.</p>
<li data-md>
<p>If <var>map</var>[<var>globaladdr</var>] <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#map-exists" id="ref-for-map-exists⑧">exists</a>,</p>
<ol>
<li data-md>
<p>Return <var>map</var>[<var>globaladdr</var>].</p>
</ol>
<li data-md>
<p>Let <var>global</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new④">new</a> <code class="idl"><a data-link-type="idl" href="#global" id="ref-for-global④">Global</a></code>.</p>
<li data-md>
<p><a data-link-type="dfn" href="#initialize-a-global-object" id="ref-for-initialize-a-global-object">Initialize</a> <var>global</var> from <var>globaladdr</var>.</p>
<li data-md>
<p>Return <var>global</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="ToValueType">
The algorithm <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="tovaluetype">ToValueType</dfn>(<var>s</var>) performs the following steps:
<ol>
<li data-md>
<p>If <var>s</var> equals "i32", return <a data-link-type="dfn" data-refhint-key="cb68a816" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-numtype" id="ref-for-syntax-numtype②">i32</a>.</p>
<li data-md>
<p>If <var>s</var> equals "i64", return <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-numtype" id="ref-for-syntax-numtype③">i64</a>.</p>
<li data-md>
<p>If <var>s</var> equals "f32", return <a data-link-type="dfn" data-refhint-key="38f42dd7" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-numtype" id="ref-for-syntax-numtype④">f32</a>.</p>
<li data-md>
<p>If <var>s</var> equals "f64", return <a data-link-type="dfn" data-refhint-key="01689b05" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-numtype" id="ref-for-syntax-numtype⑤">f64</a>.</p>
<li data-md>
<p>If <var>s</var> equals "v128", return <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#vector-types" id="ref-for-vector-types①">v128</a>.</p>
<li data-md>
<p>If <var>s</var> equals "anyfunc", return <a data-link-type="dfn" data-refhint-key="960a3c13" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-reftype" id="ref-for-syntax-reftype①">funcref</a>.</p>
<li data-md>
<p>If <var>s</var> equals "externref", return <a data-link-type="dfn" data-refhint-key="6295139b" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-reftype" id="ref-for-syntax-reftype②">externref</a>.</p>
<li data-md>
<p class="assertion">Assert: This step is not reached.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="DefaultValue">
The algorithm <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="defaultvalue">DefaultValue</dfn>(<var>valuetype</var>) performs the following steps:
<ol>
<li data-md>
<p>If <var>valuetype</var> equals <a data-link-type="dfn" data-refhint-key="cb68a816" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-numtype" id="ref-for-syntax-numtype⑥">i32</a>, return <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#values" id="ref-for-values①">i32.const</a> 0.</p>
<li data-md>
<p>If <var>valuetype</var> equals <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-numtype" id="ref-for-syntax-numtype⑦">i64</a>, return <a data-link-type="dfn" data-refhint-key="ad93d751" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#values" id="ref-for-values②">i64.const</a> 0.</p>
<li data-md>
<p>If <var>valuetype</var> equals <a data-link-type="dfn" data-refhint-key="38f42dd7" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-numtype" id="ref-for-syntax-numtype⑧">f32</a>, return <a data-link-type="dfn" data-refhint-key="2461a609" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#values" id="ref-for-values③">f32.const</a> 0.</p>
<li data-md>
<p>If <var>valuetype</var> equals <a data-link-type="dfn" data-refhint-key="01689b05" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-numtype" id="ref-for-syntax-numtype⑨">f64</a>, return <a data-link-type="dfn" data-refhint-key="0782cc57" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#values" id="ref-for-values④">f64.const</a> 0.</p>
<li data-md>
<p>If <var>valuetype</var> equals <a data-link-type="dfn" data-refhint-key="960a3c13" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-reftype" id="ref-for-syntax-reftype③">funcref</a>, return <a data-link-type="dfn" data-refhint-key="21fcce43" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#values" id="ref-for-values⑤">ref.null</a> <a data-link-type="dfn" data-refhint-key="960a3c13" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-reftype" id="ref-for-syntax-reftype④">funcref</a>.</p>
<li data-md>
<p>If <var>valuetype</var> equals <a data-link-type="dfn" data-refhint-key="6295139b" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-reftype" id="ref-for-syntax-reftype⑤">externref</a>, return <a data-link-type="dfn" href="#towebassemblyvalue" id="ref-for-towebassemblyvalue④">ToWebAssemblyValue</a>(undefined, <var>valuetype</var>).</p>
<li data-md>
<p class="assertion">Assert: This step is not reached.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="Global(descriptor, v)" data-algorithm-for="Global">
The <dfn class="dfn-paneled idl-code" data-dfn-for="Global" data-dfn-type="constructor" data-export data-lt="Global(descriptor, v)|constructor(descriptor, v)|Global(descriptor)|constructor(descriptor)" id="dom-global-global"><code>Global(<var>descriptor</var>, <var>v</var>)</code></dfn> constructor, when invoked, performs the following steps:
<ol>
<li data-md>
<p>Let <var>mutable</var> be <var>descriptor</var>["mutable"].</p>
<li data-md>
<p>Let <var>valuetype</var> be <a data-link-type="dfn" href="#tovaluetype" id="ref-for-tovaluetype①">ToValueType</a>(<var>descriptor</var>["value"]).</p>
<li data-md>
<p>If <var>valuetype</var> is <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#vector-types" id="ref-for-vector-types②">v128</a>,</p>
<ol>
<li data-md>
<p>Throw a <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-typeerror" id="ref-for-sec-native-error-types-used-in-this-standard-typeerror③">TypeError</a></code> exception.</p>
</ol>
<li data-md>
<p>If <var>v</var> is missing,</p>
<ol>
<li data-md>
<p>Let <var>value</var> be <a data-link-type="dfn" href="#defaultvalue" id="ref-for-defaultvalue③">DefaultValue</a>(<var>valuetype</var>).</p>
</ol>
<li data-md>
<p>Otherwise,</p>
<ol>
<li data-md>
<p>Let <var>value</var> be <a data-link-type="dfn" href="#towebassemblyvalue" id="ref-for-towebassemblyvalue⑤">ToWebAssemblyValue</a>(<var>v</var>, <var>valuetype</var>).</p>
</ol>
<li data-md>
<p>If <var>mutable</var> is true, let <var>globaltype</var> be <a data-link-type="dfn" data-refhint-key="07b2e8ca" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-mut" id="ref-for-syntax-mut①">var</a> <var>valuetype</var>; otherwise, let <var>globaltype</var> be <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-mut" id="ref-for-syntax-mut②">const</a> <var>valuetype</var>.</p>
<li data-md>
<p>Let <var>store</var> be the current agent’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store①⑥">associated store</a>.</p>
<li data-md>
<p>Let (<var>store</var>, <var>globaladdr</var>) be <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-global-alloc" id="ref-for-embed-global-alloc①">global_alloc</a>(<var>store</var>, <var>globaltype</var>, <var>value</var>). </p>
<li data-md>
<p>Set the current agent’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store①⑦">associated store</a> to <var>store</var>.</p>
<li data-md>
<p><a data-link-type="dfn" href="#initialize-a-global-object" id="ref-for-initialize-a-global-object①">Initialize</a> <strong>this</strong> from <var>globaladdr</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="GetGlobalValue">
The algorithm <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="getglobalvalue">GetGlobalValue</dfn>(<code class="idl"><a data-link-type="idl" href="#global" id="ref-for-global⑤">Global</a></code> <var>global</var>) performs the following steps:
<ol>
<li data-md>
<p>Let <var>store</var> be the current agent’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store①⑧">associated store</a>.</p>
<li data-md>
<p>Let <var>globaladdr</var> be <var>global</var>.[[Global]].</p>
<li data-md>
<p>Let <var>globaltype</var> be <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-global-type" id="ref-for-embed-global-type">global_type</a>(<var>store</var>, <var>globaladdr</var>).</p>
<li data-md>
<p>If <var>globaltype</var> is of the form <var>mut</var> <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#vector-types" id="ref-for-vector-types③">v128</a>, throw a <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-typeerror" id="ref-for-sec-native-error-types-used-in-this-standard-typeerror④">TypeError</a></code>.</p>
<li data-md>
<p>Let <var>value</var> be <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-global-read" id="ref-for-embed-global-read">global_read</a>(<var>store</var>, <var>globaladdr</var>).</p>
<li data-md>
<p>Return <a data-link-type="dfn" href="#tojsvalue" id="ref-for-tojsvalue①">ToJSValue</a>(<var>value</var>).</p>
</ol>
</div>
<div class="algorithm" data-algorithm="value" data-algorithm-for="Global">
The getter of the <dfn class="dfn-paneled idl-code" data-dfn-for="Global" data-dfn-type="attribute" data-export id="dom-global-value"><code>value</code></dfn> attribute of <code class="idl"><a data-link-type="idl" href="#global" id="ref-for-global⑥">Global</a></code>, when invoked, performs the following steps:
<ol>
<li data-md>
<p>Return <a data-link-type="dfn" href="#getglobalvalue" id="ref-for-getglobalvalue">GetGlobalValue</a>(<strong>this</strong>).</p>
</ol>
<p>The setter of the value attribute of <code class="idl"><a data-link-type="idl" href="#global" id="ref-for-global⑦">Global</a></code>, when invoked, performs the following steps:</p>
<ol>
<li data-md>
<p>Let <var>store</var> be the current agent’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store①⑨">associated store</a>.</p>
<li data-md>
<p>Let <var>globaladdr</var> be <strong>this</strong>.[[Global]].</p>
<li data-md>
<p>Let <var>mut</var> <var>valuetype</var> be <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-global-type" id="ref-for-embed-global-type①">global_type</a>(<var>store</var>, <var>globaladdr</var>).</p>
<li data-md>
<p>If <var>valuetype</var> is <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#vector-types" id="ref-for-vector-types④">v128</a>, throw a <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-typeerror" id="ref-for-sec-native-error-types-used-in-this-standard-typeerror⑤">TypeError</a></code>.</p>
<li data-md>
<p>If <var>mut</var> is <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-mut" id="ref-for-syntax-mut③">const</a>, throw a <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-typeerror" id="ref-for-sec-native-error-types-used-in-this-standard-typeerror⑥">TypeError</a></code>.</p>
<li data-md>
<p>Let <var>value</var> be <a data-link-type="dfn" href="#towebassemblyvalue" id="ref-for-towebassemblyvalue⑥">ToWebAssemblyValue</a>(<strong>the given value</strong>, <var>valuetype</var>).</p>
<li data-md>
<p>Let <var>store</var> be <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-global-write" id="ref-for-embed-global-write">global_write</a>(<var>store</var>, <var>globaladdr</var>, <var>value</var>).</p>
<li data-md>
<p>If <var>store</var> is <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-error" id="ref-for-embed-error①③">error</a>, throw a <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-rangeerror" id="ref-for-sec-native-error-types-used-in-this-standard-rangeerror⑦">RangeError</a></code> exception.</p>
<li data-md>
<p>Set the current agent’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store②⓪">associated store</a> to <var>store</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="valueOf()" data-algorithm-for="Global">
The <dfn class="dfn-paneled idl-code" data-dfn-for="Global" data-dfn-type="method" data-export id="dom-global-valueof"><code>valueOf()</code></dfn> method, when invoked, performs the following steps:
<ol>
<li data-md>
<p>Return <a data-link-type="dfn" href="#getglobalvalue" id="ref-for-getglobalvalue①">GetGlobalValue</a>(<strong>this</strong>).</p>
</ol>
</div>
<h3 class="heading settled" data-level="4.6" id="exported-function-exotic-objects"><span class="secno">4.6. </span><span class="content">Exported Functions</span><a class="self-link" href="#exported-function-exotic-objects"></a></h3>
<p>A WebAssembly function is made available in JavaScript as an <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="exported-function">Exported Function</dfn>.
Exported Functions are <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-built-in-function-objects" id="ref-for-sec-built-in-function-objects">Built-in Function Objects</a> which are not constructors, and which have a [[FunctionAddress]] internal slot.
This slot holds a <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-funcaddr" id="ref-for-syntax-funcaddr①">function address</a> relative to the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent②②">surrounding agent</a>’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store②①">associated store</a>.</p>
<div class="algorithm" data-algorithm="name of the WebAssembly function">
The <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="name-of-the-webassembly-function">name of the WebAssembly function</dfn> <var>funcaddr</var> is found by performing the following steps:
<ol>
<li data-md>
<p>Let <var>store</var> be the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent②③">surrounding agent</a>’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store②②">associated store</a>.</p>
<li data-md>
<p>Let <var>funcinst</var> be <var>store</var>.funcs[<var>funcaddr</var>].</p>
<li data-md>
<p>If <var>funcinst</var> is of the form {type <var>functype</var>, hostcode <var>hostfunc</var>},</p>
<ol>
<li data-md>
<p class="assertion">Assert: <var>hostfunc</var> is a JavaScript object and <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-iscallable" id="ref-for-sec-iscallable①">IsCallable</a>(<var>hostfunc</var>) is true.</p>
<li data-md>
<p>Let <var>index</var> be the <a data-link-type="dfn" href="#index-of-the-host-function" id="ref-for-index-of-the-host-function">index of the host function</a> <var>funcaddr</var>.</p>
</ol>
<li data-md>
<p>Otherwise,</p>
<ol>
<li data-md>
<p>Let <var>moduleinst</var> be <var>funcinst</var>.module.</p>
<li data-md>
<p class="assertion">Assert: <var>funcaddr</var> is contained in <var>moduleinst</var>.funcaddrs.</p>
<li data-md>
<p>Let <var>index</var> be the index of <var>moduleinst</var>.funcaddrs where <var>funcaddr</var> is found.</p>
</ol>
<li data-md>
<p>Return <a data-link-type="dfn" data-refhint-key="f4fa6c3b" href="https://tc39.github.io/ecma262/#sec-returnifabrupt-shorthands" id="ref-for-sec-returnifabrupt-shorthands⑨">!</a> <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-tostring" id="ref-for-sec-tostring">ToString</a>(<var>index</var>).</p>
</ol>
</div>
<div class="algorithm" data-algorithm="a new Exported Function">
To create <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="a-new-exported-function">a new Exported Function</dfn> from a WebAssembly <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-funcaddr" id="ref-for-syntax-funcaddr②">function address</a> <var>funcaddr</var>, perform the following steps:
<ol>
<li data-md>
<p>Let <var>map</var> be the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent②④">surrounding agent</a>’s associated <a data-link-type="dfn" href="#exported-function-cache" id="ref-for-exported-function-cache">Exported Function cache</a>.</p>
<li data-md>
<p>If <var>map</var>[<var>funcaddr</var>] <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#map-exists" id="ref-for-map-exists⑨">exists</a>,</p>
<ol>
<li data-md>
<p>Return <var>map</var>[<var>funcaddr</var>].</p>
</ol>
<li data-md>
<p>Let <var>steps</var> be "<a data-link-type="dfn" href="#call-an-exported-function" id="ref-for-call-an-exported-function">call the Exported Function</a> <var>funcaddr</var> with arguments."</p>
<li data-md>
<p>Let <var>realm</var> be the <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#current-realm" id="ref-for-current-realm">current Realm</a>.</p>
<li data-md>
<p>Let <var>store</var> be the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent②⑤">surrounding agent</a>’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store②③">associated store</a>.</p>
<li data-md>
<p>Let <var>functype</var> be <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-func-type" id="ref-for-embed-func-type">func_type</a>(<var>store</var>, <var>funcaddr</var>).</p>
<li data-md>
<p>Let [<var>paramTypes</var>] → [<var>resultTypes</var>] be <var>functype</var>.</p>
<li data-md>
<p>Let <var>arity</var> be <var>paramTypes</var>’s <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-size" id="ref-for-list-size">size</a>.</p>
<li data-md>
<p>Let <var>name</var> be the <a data-link-type="dfn" href="#name-of-the-webassembly-function" id="ref-for-name-of-the-webassembly-function">name of the WebAssembly function</a> <var>funcaddr</var>.</p>
<li data-md>
<p>Let <var>function</var> be <a data-link-type="dfn" data-refhint-key="f4fa6c3b" href="https://tc39.github.io/ecma262/#sec-returnifabrupt-shorthands" id="ref-for-sec-returnifabrupt-shorthands①⓪">!</a> <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/ordinary-and-exotic-objects-behaviours.html#sec-createbuiltinfunction" id="ref-for-sec-createbuiltinfunction">CreateBuiltinFunction</a>(<var>steps</var>, <var>arity</var>, <var>name</var>, « [[FunctionAddress]] », <var>realm</var>).</p>
<li data-md>
<p>Set <var>function</var>.[[FunctionAddress]] to <var>funcaddr</var>.</p>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#map-set" id="ref-for-map-set③">Set</a> <var>map</var>[<var>funcaddr</var>] to <var>function</var>.</p>
<li data-md>
<p>Return <var>function</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="call an Exported Function">
To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="call-an-exported-function">call an Exported Function</dfn> with <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-funcaddr" id="ref-for-syntax-funcaddr③">function address</a> <var>funcaddr</var> and a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list①">list</a> of JavaScript arguments <var>argValues</var>, perform the following steps:
<ol>
<li data-md>
<p>Let <var>store</var> be the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent②⑥">surrounding agent</a>’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store②④">associated store</a>.</p>
<li data-md>
<p>Let <var>functype</var> be <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-func-type" id="ref-for-embed-func-type①">func_type</a>(<var>store</var>, <var>funcaddr</var>).</p>
<li data-md>
<p>Let [<var>parameters</var>] → [<var>results</var>] be <var>functype</var>.</p>
<li data-md>
<p>If <var>parameters</var> or <var>results</var> contain <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#vector-types" id="ref-for-vector-types⑤">v128</a>, throw a <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-typeerror" id="ref-for-sec-native-error-types-used-in-this-standard-typeerror⑦">TypeError</a></code>.</p>
<p class="note" role="note"><span class="marker">Note:</span> the above error is thrown each time the [[Call]] method is invoked.</p>
<li data-md>
<p>Let <var>args</var> be « ».</p>
<li data-md>
<p>Let <var>i</var> be 0.</p>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate⑤">For each</a> <var>t</var> of <var>parameters</var>,</p>
<ol>
<li data-md>
<p>If <var>argValues</var>’s <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-size" id="ref-for-list-size①">size</a> > <var>i</var>, let <var>arg</var> be <var>argValues</var>[<var>i</var>].</p>
<li data-md>
<p>Otherwise, let <var>arg</var> be undefined.</p>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-append" id="ref-for-list-append⑧">Append</a> <a data-link-type="dfn" href="#towebassemblyvalue" id="ref-for-towebassemblyvalue⑦">ToWebAssemblyValue</a>(<var>arg</var>, <var>t</var>) to <var>args</var>.</p>
<li data-md>
<p>Set <var>i</var> to <var>i</var> + 1.</p>
</ol>
<li data-md>
<p>Let (<var>store</var>, <var>ret</var>) be the result of <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-func-invoke" id="ref-for-embed-func-invoke">func_invoke</a>(<var>store</var>, <var>funcaddr</var>, <var>args</var>).</p>
<li data-md>
<p class="note" role="note"><span class="marker">Note:</span> The expectation is that <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-func-invoke" id="ref-for-embed-func-invoke①">func_invoke</a> will be updated to return (<var>store</var>, <var>val</var>* | <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-error" id="ref-for-embed-error①④">error</a> | (exception <var>exntag</var> <var>payload</var> <var>opaqueData</var>)).</p>
<li data-md>
<p>Set the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent②⑦">surrounding agent</a>’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store②⑤">associated store</a> to <var>store</var>.</p>
<li data-md>
<p>If <var>ret</var> is <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-error" id="ref-for-embed-error①⑤">error</a>, throw an exception. This exception should be a WebAssembly <code class="idl"><a data-link-type="idl" href="#exceptiondef-runtimeerror" id="ref-for-exceptiondef-runtimeerror①">RuntimeError</a></code> exception, unless otherwise indicated by <a href="#errors">the WebAssembly error mapping</a>.</p>
<li data-md>
<p>If <var>ret</var> is exception <var>exntag</var> <var>payload</var> <var>opaqueData</var>, then</p>
<ol>
<li data-md>
<p>If <var>opaqueData</var> is not <a data-link-type="dfn" data-refhint-key="21fcce43" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#values" id="ref-for-values⑥">ref.null</a> <a data-link-type="dfn" data-refhint-key="6295139b" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-reftype" id="ref-for-syntax-reftype⑥">externref</a>,</p>
<ol>
<li data-md>
<p>Let « <a data-link-type="dfn" data-refhint-key="844a951c" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#values" id="ref-for-values⑦">ref.extern</a> <var>externaddr</var> » be <var>opaqueData</var>.</p>
<li data-md>
<p>Throw the result of <a data-link-type="dfn" href="#retrieving-an-extern-value" id="ref-for-retrieving-an-extern-value">retrieving an extern value</a> from <var>externaddr</var>.</p>
</ol>
<li data-md>
<p>Let <var>exception</var> be <a data-link-type="dfn" href="#create-an-exception-object" id="ref-for-create-an-exception-object">a new Exception</a> for <var>exntag</var> and <var>payload</var>.</p>
<li data-md>
<p>Throw <var>exception</var>.</p>
</ol>
<li data-md>
<p>Let <var>outArity</var> be the <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-size" id="ref-for-list-size②">size</a> of <var>ret</var>.</p>
<li data-md>
<p>If <var>outArity</var> is 0, return undefined.</p>
<li data-md>
<p>Otherwise, if <var>outArity</var> is 1, return <a data-link-type="dfn" href="#tojsvalue" id="ref-for-tojsvalue②">ToJSValue</a>(<var>ret</var>[0]).</p>
<li data-md>
<p>Otherwise,</p>
<ol>
<li data-md>
<p>Let <var>values</var> be « ».</p>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate⑥">For each</a> <var>r</var> of <var>ret</var>,</p>
<ol>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-append" id="ref-for-list-append⑨">Append</a> <a data-link-type="dfn" href="#tojsvalue" id="ref-for-tojsvalue③">ToJSValue</a>(<var>r</var>) to <var>values</var>.</p>
</ol>
<li data-md>
<p>Return <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-createarrayfromlist" id="ref-for-sec-createarrayfromlist">CreateArrayFromList</a>(<var>values</var>).</p>
</ol>
</ol>
</div>
<p class="note" role="note"><span class="marker">Note:</span> <a data-link-type="dfn" href="#call-an-exported-function" id="ref-for-call-an-exported-function①">Calling an Exported Function</a> executes in the [[Realm]] of the callee Exported Function, as per the definition of <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-built-in-function-objects" id="ref-for-sec-built-in-function-objects①">built-in function objects</a>.</p>
<p class="note" role="note"><span class="marker">Note:</span> Exported Functions do not have a [[Construct]] method and thus it is not possible to call one with the <code>new</code> operator.</p>
<div class="algorithm" data-algorithm="run a host function">
To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="run-a-host-function">run a host function</dfn> from the JavaScript object <var>func</var>, type <var>functype</var>, and <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list②">list</a> of <a data-link-type="dfn" data-refhint-key="b8c44e95" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#values" id="ref-for-values⑧">WebAssembly values</a> <var>arguments</var>, perform the following steps:
<ol>
<li data-md>
<p>Let [<var>parameters</var>] → [<var>results</var>] be <var>functype</var>.</p>
<li data-md>
<p>If <var>parameters</var> or <var>results</var> contain <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#vector-types" id="ref-for-vector-types⑥">v128</a>, throw a <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-typeerror" id="ref-for-sec-native-error-types-used-in-this-standard-typeerror⑧">TypeError</a></code>.</p>
<li data-md>
<p>Let <var>jsArguments</var> be « ».</p>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate⑦">For each</a> <var>arg</var> of <var>arguments</var>,</p>
<ol>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-append" id="ref-for-list-append①⓪">Append</a> <a data-link-type="dfn" data-refhint-key="f4fa6c3b" href="https://tc39.github.io/ecma262/#sec-returnifabrupt-shorthands" id="ref-for-sec-returnifabrupt-shorthands①①">!</a> <a data-link-type="dfn" href="#tojsvalue" id="ref-for-tojsvalue④">ToJSValue</a>(<var>arg</var>) to <var>jsArguments</var>.</p>
</ol>
<li data-md>
<p>Let <var>ret</var> be <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-returnifabrupt-shorthands" id="ref-for-sec-returnifabrupt-shorthands①②">?</a> <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-call" id="ref-for-sec-call">Call</a>(<var>func</var>, undefined, <var>jsArguments</var>).</p>
<li data-md>
<p>Let <var>resultsSize</var> be <var>results</var>’s <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-size" id="ref-for-list-size③">size</a>.</p>
<li data-md>
<p>If <var>resultsSize</var> is 0, return « ».</p>
<li data-md>
<p>Otherwise, if <var>resultsSize</var> is 1, return « <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-returnifabrupt-shorthands" id="ref-for-sec-returnifabrupt-shorthands①③">?</a> <a data-link-type="dfn" href="#towebassemblyvalue" id="ref-for-towebassemblyvalue⑧">ToWebAssemblyValue</a>(<var>ret</var>, <var>results</var>[0]) ».</p>
<li data-md>
<p>Otherwise,</p>
<ol>
<li data-md>
<p>Let <var>method</var> be <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-returnifabrupt-shorthands" id="ref-for-sec-returnifabrupt-shorthands①④">?</a> <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-getmethod" id="ref-for-sec-getmethod">GetMethod</a>(<var>ret</var>, <code class="idl"><u class="link-error" data-lt="@@iterator" title="LINK ERROR: No &apos;idl&apos; refs found for &apos;@@iterator&apos;.">@@iterator</u></code>).</p>
<li data-md>
<p>If <var>method</var> is undefined, <a data-link-type="dfn" href="#webassembly-throw" id="ref-for-webassembly-throw①">throw</a> a <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-typeerror" id="ref-for-sec-native-error-types-used-in-this-standard-typeerror⑨">TypeError</a></code>.</p>
<li data-md>
<p>Let <var>values</var> be <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-returnifabrupt-shorthands" id="ref-for-sec-returnifabrupt-shorthands①⑤">?</a> <u class="link-error" data-lt="IterableToList" title="LINK ERROR: No &apos;abstract-op&apos; refs found for &apos;IterableToList&apos;.">IterableToList</u>(<var>ret</var>, <var>method</var>).</p>
<li data-md>
<p>Let <var>wasmValues</var> be a new, empty <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list③">list</a>.</p>
<li data-md>
<p>If <var>values</var>’s <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-size" id="ref-for-list-size④">size</a> is not <var>resultsSize</var>, throw a <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-typeerror" id="ref-for-sec-native-error-types-used-in-this-standard-typeerror①⓪">TypeError</a></code> exception.</p>
<li data-md>
<p>For each <var>value</var> and <var>resultType</var> in <var>values</var> and <var>results</var>, paired linearly,</p>
<ol>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-append" id="ref-for-list-append①①">Append</a> <a data-link-type="dfn" href="#towebassemblyvalue" id="ref-for-towebassemblyvalue⑨">ToWebAssemblyValue</a>(<var>value</var>, <var>resultType</var>) to <var>wasmValues</var>.</p>
</ol>
<li data-md>
<p>Return <var>wasmValues</var>.</p>
</ol>
</ol>
</div>
<div class="algorithm" data-algorithm="create a host function">
To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="create-a-host-function">create a host function</dfn> from the JavaScript object <var>func</var> and type <var>functype</var>, perform the following steps:
<ol>
<li data-md>
<p class="assertion">Assert: <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-iscallable" id="ref-for-sec-iscallable②">IsCallable</a>(<var>func</var>).</p>
<li data-md>
<p>Let <var>stored settings</var> be the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#incumbent-settings-object" id="ref-for-incumbent-settings-object">incumbent settings object</a>.</p>
<li data-md>
<p>Let <var>hostfunc</var> be a <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-hostfunc" id="ref-for-syntax-hostfunc">host function</a> which performs the following steps when called with arguments <var>arguments</var>:</p>
<ol>
<li data-md>
<p>Let <var>realm</var> be <var>func</var>’s <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-associated-realm" id="ref-for-dfn-associated-realm">associated Realm</a>.</p>
<li data-md>
<p>Let <var>relevant settings</var> be <var>realm</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-realm-settings-object" id="ref-for-concept-realm-settings-object">settings object</a>.</p>
<li data-md>
<p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#prepare-to-run-script" id="ref-for-prepare-to-run-script">Prepare to run script</a> with <var>relevant settings</var>.</p>
<li data-md>
<p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#prepare-to-run-a-callback" id="ref-for-prepare-to-run-a-callback">Prepare to run a callback</a> with <var>stored settings</var>.</p>
<li data-md>
<p>Let <var>result</var> be the result of <a data-link-type="dfn" href="#run-a-host-function" id="ref-for-run-a-host-function">running a host function</a> from <var>func</var>, <var>functype</var>, and <var>arguments</var>.</p>
<li data-md>
<p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#clean-up-after-running-a-callback" id="ref-for-clean-up-after-running-a-callback">Clean up after running a callback</a> with <var>stored settings</var>.</p>
<li data-md>
<p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#clean-up-after-running-script" id="ref-for-clean-up-after-running-script">Clean up after running script</a> with <var>relevant settings</var>.</p>
<li data-md>
<p class="assertion">Assert: <var>result</var>.[[Type]] is <emu-const>throw</emu-const> or <emu-const>normal</emu-const>.</p>
<li data-md>
<p>If <var>result</var>.[[Type]] is <emu-const>throw</emu-const>, then:</p>
<ol>
<li data-md>
<p>Let <var>v</var> be <var>result</var>.[[Value]].</p>
<li data-md>
<p>If <var>v</var> <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#implements" id="ref-for-implements④">implements</a> <code class="idl"><a data-link-type="idl" href="#exception" id="ref-for-exception">Exception</a></code>,</p>
<ol>
<li data-md>
<p>Let <var>type</var> be <var>v</var>.[[Type]].</p>
<li data-md>
<p>Let <var>payload</var> be <var>v</var>.[[Payload]].</p>
</ol>
<li data-md>
<p>Otherwise,</p>
<ol>
<li data-md>
<p>Let <var>type</var> be the <a data-link-type="dfn" href="#javascript-exception-tag" id="ref-for-javascript-exception-tag">JavaScript exception tag</a>.</p>
<li data-md>
<p>Let <var>payload</var> be « ».</p>
</ol>
<li data-md>
<p>Let <var>opaqueData</var> be <a data-link-type="dfn" href="#towebassemblyvalue" id="ref-for-towebassemblyvalue①⓪">ToWebAssemblyValue</a>(<var>v</var>, <a data-link-type="dfn" data-refhint-key="6295139b" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-reftype" id="ref-for-syntax-reftype⑦">externref</a>)</p>
<li data-md>
<p><a data-link-type="dfn" href="#webassembly-throw" id="ref-for-webassembly-throw②">Throw</a> with <var>type</var>, <var>payload</var> and <var>opaqueData</var>.</p>
</ol>
<li data-md>
<p>Otherwise, return <var>result</var>.[[Value]].</p>
</ol>
<li data-md>
<p>Let <var>store</var> be the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent②⑧">surrounding agent</a>’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store②⑥">associated store</a>.</p>
<li data-md>
<p>Let (<var>store</var>, <var>funcaddr</var>) be <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-func-alloc" id="ref-for-embed-func-alloc">func_alloc</a>(<var>store</var>, <var>functype</var>, <var>hostfunc</var>).</p>
<li data-md>
<p>Set the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent②⑨">surrounding agent</a>’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store②⑦">associated store</a> to <var>store</var>.</p>
<li data-md>
<p>Return <var>funcaddr</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="ToJSValue">
The algorithm <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="tojsvalue">ToJSValue</dfn>(<var>w</var>) coerces a <a data-link-type="dfn" data-refhint-key="b8c44e95" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#values" id="ref-for-values⑨">WebAssembly value</a> to a JavaScript value by performing the following steps:
<ol>
<li data-md>
<p class="assertion">Assert: <var>w</var> is not of the form <a data-link-type="dfn" data-refhint-key="54ccbc1d" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#values" id="ref-for-values①⓪">v128.const</a> <var>v128</var>.</p>
<li data-md>
<p>If <var>w</var> is of the form <a data-link-type="dfn" data-refhint-key="ad93d751" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#values" id="ref-for-values①①">i64.const</a> <var>i64</var>,</p>
<ol>
<li data-md>
<p>Let <var>v</var> be <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/numerics.html#aux-signed" id="ref-for-aux-signed">signed_64</a>(<var>i64</var>).</p>
<li data-md>
<p>Return <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#ℤ" id="ref-for-ℤ"></a>(<var>v</var> interpreted as a mathematical value).</p>
</ol>
<li data-md>
<p>If <var>w</var> is of the form <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#values" id="ref-for-values①②">i32.const</a> <var>i32</var>, return <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#𝔽" id="ref-for-𝔽">𝔽</a>(<a data-link-type="dfn" data-refhint-key="ed607b12" href="https://webassembly.github.io/exception-handling/core/exec/numerics.html#aux-signed" id="ref-for-aux-signed①">signed_32</a>(<var>i32</var> interpreted as a mathematical value)).</p>
<li data-md>
<p>If <var>w</var> is of the form <a data-link-type="dfn" data-refhint-key="2461a609" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#values" id="ref-for-values①③">f32.const</a> <var>f32</var>,</p>
<ol>
<li data-md>
<p>If <var>f32</var> is <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/syntax/values.html#syntax-float" id="ref-for-syntax-float">+∞</a> or <a data-link-type="dfn" data-refhint-key="850ab208" href="https://webassembly.github.io/exception-handling/core/syntax/values.html#syntax-float" id="ref-for-syntax-float①">−∞</a>, return <strong>+∞</strong><sub>𝔽</sub> or <strong>-∞</strong><sub>𝔽</sub>, respectively.</p>
<li data-md>
<p>If <var>f32</var> is <a data-link-type="dfn" data-refhint-key="e2c10855" href="https://webassembly.github.io/exception-handling/core/syntax/values.html#syntax-float" id="ref-for-syntax-float②">nan</a>, return <strong>NaN</strong>.</p>
<li data-md>
<p>Return <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#𝔽" id="ref-for-𝔽①">𝔽</a>(<var>f32</var> interpreted as a mathematical value).</p>
</ol>
<li data-md>
<p>If <var>w</var> is of the form <a data-link-type="dfn" data-refhint-key="0782cc57" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#values" id="ref-for-values①④">f64.const</a> <var>f64</var>,</p>
<ol>
<li data-md>
<p>If <var>f64</var> is <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/syntax/values.html#syntax-float" id="ref-for-syntax-float③">+∞</a> or <a data-link-type="dfn" data-refhint-key="850ab208" href="https://webassembly.github.io/exception-handling/core/syntax/values.html#syntax-float" id="ref-for-syntax-float④">−∞</a>, return <strong>+∞</strong><sub>𝔽</sub> or <strong>-∞</strong><sub>𝔽</sub>, respectively.</p>
<li data-md>
<p>If <var>f64</var> is <a data-link-type="dfn" data-refhint-key="e2c10855" href="https://webassembly.github.io/exception-handling/core/syntax/values.html#syntax-float" id="ref-for-syntax-float⑤">nan</a>, return <strong>NaN</strong>.</p>
<li data-md>
<p>Return <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#𝔽" id="ref-for-𝔽②">𝔽</a>(<var>f64</var> interpreted as a mathematical value).</p>
</ol>
<li data-md>
<p>If <var>w</var> is of the form <a data-link-type="dfn" data-refhint-key="21fcce43" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#values" id="ref-for-values①⑤">ref.null</a> <var>t</var>, return null.</p>
<li data-md>
<p>If <var>w</var> is of the form <a data-link-type="dfn" data-refhint-key="d47a44ce" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#values" id="ref-for-values①⑥">ref.func</a> <var>funcaddr</var>, return the result of creating <a data-link-type="dfn" href="#a-new-exported-function" id="ref-for-a-new-exported-function①">a new Exported Function</a> from <var>funcaddr</var>.</p>
<li data-md>
<p>If <var>w</var> is of the form <a data-link-type="dfn" data-refhint-key="844a951c" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#values" id="ref-for-values①⑦">ref.extern</a> <var>externaddr</var>, return the result of <a data-link-type="dfn" href="#retrieving-an-extern-value" id="ref-for-retrieving-an-extern-value①">retrieving an extern value</a> from <var>externaddr</var>.</p>
</ol>
<p class="note" role="note"><span class="marker">Note:</span> Number values which are equal to NaN may have various observable NaN payloads; see <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/structured-data.html#sec-numerictorawbytes" id="ref-for-sec-numerictorawbytes">NumericToRawBytes</a> for details.</p>
</div>
<div class="algorithm" data-algorithm="retrieving an extern value">
<p>For <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="retrieving-an-extern-value">retrieving an extern value</dfn> from an <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externaddr" id="ref-for-syntax-externaddr①">extern address</a> <var>externaddr</var>, perform the following steps:</p>
<ol>
<li data-md>
<p>Let <var>map</var> be the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent③⓪">surrounding agent</a>’s associated <a data-link-type="dfn" href="#extern-value-cache" id="ref-for-extern-value-cache">extern value cache</a>.</p>
<li data-md>
<p class="assertion">Assert: <var>map</var>[<var>externaddr</var>] <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#map-exists" id="ref-for-map-exists①⓪">exists</a>.</p>
<li data-md>
<p>Return <var>map</var>[<var>externaddr</var>].</p>
</ol>
</div>
<div class="algorithm" data-algorithm="ToWebAssemblyValue">
The algorithm <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="towebassemblyvalue">ToWebAssemblyValue</dfn>(<var>v</var>, <var>type</var>) coerces a JavaScript value to a <a data-link-type="dfn" data-refhint-key="b8c44e95" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#values" id="ref-for-values①⑧">WebAssembly value</a> by performing the following steps:
<ol>
<li data-md>
<p class="assertion">Assert: <var>type</var> is not <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#vector-types" id="ref-for-vector-types⑦">v128</a>.</p>
<li data-md>
<p>If <var>type</var> is <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-numtype" id="ref-for-syntax-numtype①⓪">i64</a>,</p>
<ol>
<li data-md>
<p>Let <var>i64</var> be <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-returnifabrupt-shorthands" id="ref-for-sec-returnifabrupt-shorthands①⑥">?</a> <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-tobigint64" id="ref-for-sec-tobigint64">ToBigInt64</a>(<var>v</var>).</p>
<li data-md>
<p>Return <a data-link-type="dfn" data-refhint-key="ad93d751" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#values" id="ref-for-values①⑨">i64.const</a> <var>i64</var>.</p>
</ol>
<li data-md>
<p>If <var>type</var> is <a data-link-type="dfn" data-refhint-key="cb68a816" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-numtype" id="ref-for-syntax-numtype①①">i32</a>,</p>
<ol>
<li data-md>
<p>Let <var>i32</var> be <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-returnifabrupt-shorthands" id="ref-for-sec-returnifabrupt-shorthands①⑦">?</a> <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-toint32" id="ref-for-sec-toint32">ToInt32</a>(<var>v</var>).</p>
<li data-md>
<p>Return <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#values" id="ref-for-values②⓪">i32.const</a> <var>i32</var>.</p>
</ol>
<li data-md>
<p>If <var>type</var> is <a data-link-type="dfn" data-refhint-key="38f42dd7" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-numtype" id="ref-for-syntax-numtype①②">f32</a>,</p>
<ol>
<li data-md>
<p>Let <var>number</var> be <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-returnifabrupt-shorthands" id="ref-for-sec-returnifabrupt-shorthands①⑧">?</a> <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-tonumber" id="ref-for-sec-tonumber">ToNumber</a>(<var>v</var>).</p>
<li data-md>
<p>If <var>number</var> is <strong>NaN</strong>,</p>
<ol>
<li data-md>
<p>Let <var>n</var> be an implementation-defined integer such that <a data-link-type="dfn" data-refhint-key="c2122786" href="https://webassembly.github.io/exception-handling/core/syntax/values.html#syntax-float" id="ref-for-syntax-float⑥">canon</a><sub>32</sub><var>n</var> &lt; 2<sup><a data-link-type="dfn" data-refhint-key="80642084" href="https://webassembly.github.io/exception-handling/core/syntax/values.html#syntax-float" id="ref-for-syntax-float⑦">signif</a>(32)</sup>.</p>
<li data-md>
<p>Let <var>f32</var> be <a data-link-type="dfn" data-refhint-key="e2c10855" href="https://webassembly.github.io/exception-handling/core/syntax/values.html#syntax-float" id="ref-for-syntax-float⑧">nan</a>(n).</p>
</ol>
<li data-md>
<p>Otherwise,</p>
<ol>
<li data-md>
<p>Let <var>f32</var> be <var>number</var> rounded to the nearest representable value using IEEE 754-2008 round to nearest, ties to even mode. <a data-link-type="biblio" href="#biblio-ieee-754" title="IEEE Standard for Floating-Point Arithmetic">[IEEE-754]</a></p>
</ol>
<li data-md>
<p>Return <a data-link-type="dfn" data-refhint-key="2461a609" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#values" id="ref-for-values②①">f32.const</a> <var>f32</var>.</p>
</ol>
<li data-md>
<p>If <var>type</var> is <a data-link-type="dfn" data-refhint-key="01689b05" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-numtype" id="ref-for-syntax-numtype①③">f64</a>,</p>
<ol>
<li data-md>
<p>Let <var>number</var> be <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-returnifabrupt-shorthands" id="ref-for-sec-returnifabrupt-shorthands①⑨">?</a> <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-tonumber" id="ref-for-sec-tonumber①">ToNumber</a>(<var>v</var>).</p>
<li data-md>
<p>If <var>number</var> is <strong>NaN</strong>,</p>
<ol>
<li data-md>
<p>Let <var>n</var> be an implementation-defined integer such that <a data-link-type="dfn" data-refhint-key="c2122786" href="https://webassembly.github.io/exception-handling/core/syntax/values.html#syntax-float" id="ref-for-syntax-float⑨">canon</a><sub>64</sub><var>n</var> &lt; 2<sup><a data-link-type="dfn" data-refhint-key="80642084" href="https://webassembly.github.io/exception-handling/core/syntax/values.html#syntax-float" id="ref-for-syntax-float①⓪">signif</a>(64)</sup>.</p>
<li data-md>
<p>Let <var>f64</var> be <a data-link-type="dfn" data-refhint-key="e2c10855" href="https://webassembly.github.io/exception-handling/core/syntax/values.html#syntax-float" id="ref-for-syntax-float①①">nan</a>(n).</p>
</ol>
<li data-md>
<p>Otherwise,</p>
<ol>
<li data-md>
<p>Let <var>f64</var> be <var>number</var>.</p>
</ol>
<li data-md>
<p>Return <a data-link-type="dfn" data-refhint-key="0782cc57" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#values" id="ref-for-values②②">f64.const</a> <var>f64</var>.</p>
</ol>
<li data-md>
<p>If <var>type</var> is <a data-link-type="dfn" data-refhint-key="960a3c13" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-reftype" id="ref-for-syntax-reftype⑧">funcref</a>,</p>
<ol>
<li data-md>
<p>If <var>v</var> is null,</p>
<ol>
<li data-md>
<p>Return <a data-link-type="dfn" data-refhint-key="21fcce43" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#values" id="ref-for-values②③">ref.null</a> <a data-link-type="dfn" data-refhint-key="960a3c13" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-reftype" id="ref-for-syntax-reftype⑨">funcref</a>.</p>
</ol>
<li data-md>
<p>If <var>v</var> is an <a data-link-type="dfn" href="#exported-function" id="ref-for-exported-function②">Exported Function</a>,</p>
<ol>
<li data-md>
<p>Let <var>funcaddr</var> be the value of <var>v</var>’s [[FunctionAddress]] internal slot.</p>
<li data-md>
<p>Return <a data-link-type="dfn" data-refhint-key="d47a44ce" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#values" id="ref-for-values②④">ref.func</a> <var>funcaddr</var>.</p>
</ol>
<li data-md>
<p>Throw a <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-typeerror" id="ref-for-sec-native-error-types-used-in-this-standard-typeerror①①">TypeError</a></code>.</p>
</ol>
<li data-md>
<p>If <var>type</var> is <a data-link-type="dfn" data-refhint-key="6295139b" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-reftype" id="ref-for-syntax-reftype①⓪">externref</a>,</p>
<ol>
<li data-md>
<p>If <var>v</var> is null,</p>
<ol>
<li data-md>
<p>Return <a data-link-type="dfn" data-refhint-key="21fcce43" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#values" id="ref-for-values②⑤">ref.null</a> <a data-link-type="dfn" data-refhint-key="6295139b" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-reftype" id="ref-for-syntax-reftype①①">externref</a>.</p>
</ol>
<li data-md>
<p>Let <var>map</var> be the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent③①">surrounding agent</a>’s associated <a data-link-type="dfn" href="#extern-value-cache" id="ref-for-extern-value-cache①">extern value cache</a>.</p>
<li data-md>
<p>If a <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externaddr" id="ref-for-syntax-externaddr②">extern address</a> <var>externaddr</var> exists such that <var>map</var>[<var>externaddr</var>] is the same as <var>v</var>,</p>
<ol>
<li data-md>
<p>Return <a data-link-type="dfn" data-refhint-key="844a951c" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#values" id="ref-for-values②⑥">ref.extern</a> <var>externaddr</var>.</p>
</ol>
<li data-md>
<p>Let <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externaddr" id="ref-for-syntax-externaddr③">extern address</a> <var>externaddr</var> be the smallest address such that <var>map</var>[<var>externaddr</var>] <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#map-exists" id="ref-for-map-exists①①">exists</a> is false.</p>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#map-set" id="ref-for-map-set④">Set</a> <var>map</var>[<var>externaddr</var>] to <var>v</var>.</p>
<li data-md>
<p>Return <a data-link-type="dfn" data-refhint-key="844a951c" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#values" id="ref-for-values②⑦">ref.extern</a> <var>externaddr</var>.</p>
</ol>
<li data-md>
<p class="assertion">Assert: This step is not reached.</p>
</ol>
</div>
<h3 class="heading settled" data-level="4.7" id="tags"><span class="secno">4.7. </span><span class="content">Tags</span><a class="self-link" href="#tags"></a></h3>
<p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="tag_alloc">tag_alloc</dfn>(<var>store</var>, <var>parameters</var>) algorithm creates a new <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-tagaddr" id="ref-for-syntax-tagaddr①">tag address</a> for <var>parameters</var> in <var>store</var> and returns the updated store and the <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-tagaddr" id="ref-for-syntax-tagaddr②">tag address</a>.</p>
<p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="tag_parameters">tag_parameters</dfn>(<var>store</var>, <var>tagAddress</var>) algorithm returns the <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list④">list</a> of types for <var>tagAddress</var> in <var>store</var>.</p>
<h4 class="heading settled" data-level="4.7.1" id="exceptions-types"><span class="secno">4.7.1. </span><span class="content">Exception types</span><a class="self-link" href="#exceptions-types"></a></h4>
<pre class="idl highlight def"><c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-tagtype"><code><c- g>TagType</c-></code></dfn> {
<c- b>required</c-> <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence" id="ref-for-idl-sequence③"><c- b>sequence</c-></a>&lt;<a data-link-type="idl-name" href="#enumdef-valuetype" id="ref-for-enumdef-valuetype①"><c- n>ValueType</c-></a>> <dfn class="dfn-paneled idl-code" data-dfn-for="TagType" data-dfn-type="dict-member" data-export data-type="sequence<ValueType>" id="dom-tagtype-parameters"><code><c- g>parameters</c-></code></dfn>;
};
[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNamespace" id="ref-for-LegacyNamespace⑤"><c- g>LegacyNamespace</c-></a>=<a data-link-type="idl-name" href="#namespacedef-webassembly" id="ref-for-namespacedef-webassembly⑤"><c- n>WebAssembly</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed" id="ref-for-Exposed"><c- g>Exposed</c-></a>=(<c- n>Window</c->,<c- n>Worker</c->,<c- n>Worklet</c->)]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="tag"><code><c- g>Tag</c-></code></dfn> {
<a class="idl-code" data-link-type="constructor" href="#dom-tag-tag" id="ref-for-dom-tag-tag"><c- g>constructor</c-></a>(<a data-link-type="idl-name" href="#dictdef-tagtype" id="ref-for-dictdef-tagtype"><c- n>TagType</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="Tag/Tag(type), Tag/constructor(type)" data-dfn-type="argument" data-export id="dom-tag-tag-type-type"><code><c- g>type</c-></code></dfn>);
<a data-link-type="idl-name" href="#dictdef-tagtype" id="ref-for-dictdef-tagtype①"><c- n>TagType</c-></a> <a class="idl-code" data-link-type="method" href="#dom-tag-type" id="ref-for-dom-tag-type"><c- g>type</c-></a>();
};
</pre>
<p>A <code class="idl"><a data-link-type="idl" href="#tag" id="ref-for-tag②">Tag</a></code> value represents a type of exception.</p>
<div class="algorithm" data-algorithm="initialize a Tag object">
<p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="initialize-a-tag-object">initialize a Tag object</dfn> <var>tag</var> from a <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-tagaddr" id="ref-for-syntax-tagaddr③">tag address</a> <var>tagAddress</var>, perform the following steps:</p>
<ol>
<li data-md>
<p>Let <var>map</var> be the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent③②">surrounding agent</a>’s associated <a data-link-type="dfn" href="#tag-object-cache" id="ref-for-tag-object-cache">Tag object cache</a>.</p>
<li data-md>
<p class="assertion">Assert: <var>map</var>[<var>tagAddress</var>] doesn’t <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#map-exists" id="ref-for-map-exists①②">exist</a>.</p>
<li data-md>
<p>Set <var>tag</var>.[[Address]] to <var>tagAddress</var>.</p>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#map-set" id="ref-for-map-set⑤">Set</a> <var>map</var>[<var>tagAddress</var>] to <var>tag</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="create a Tag object">
<p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="create-a-tag-object">create a Tag object</dfn> from a <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-tagaddr" id="ref-for-syntax-tagaddr④">tag address</a> <var>tagAddress</var>, perform the following steps:</p>
<ol>
<li data-md>
<p>Let <var>map</var> be the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent③③">surrounding agent</a>’s associated <a data-link-type="dfn" href="#tag-object-cache" id="ref-for-tag-object-cache①">Tag object cache</a>.</p>
<li data-md>
<p>If <var>map</var>[<var>tagAddress</var>] <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#map-exists" id="ref-for-map-exists①③">exists</a>,</p>
<ol>
<li data-md>
<p>Return <var>map</var>[<var>tagAddress</var>].</p>
</ol>
<li data-md>
<p>Let <var>tag</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new⑤">new</a> <code class="idl"><a data-link-type="idl" href="#tag" id="ref-for-tag③">Tag</a></code>.</p>
<li data-md>
<p><a data-link-type="dfn" href="#initialize-a-tag-object" id="ref-for-initialize-a-tag-object">Initialize</a> <var>tag</var> from <var>tagAddress</var>.</p>
<li data-md>
<p>Return <var>tag</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="Tag(type)" data-algorithm-for="Tag">
<p>The <dfn class="dfn-paneled idl-code" data-dfn-for="Tag" data-dfn-type="constructor" data-export data-lt="Tag(type)|constructor(type)" id="dom-tag-tag"><code>new Tag(<var>type</var>)</code></dfn> constructor steps are:</p>
<ol>
<li data-md>
<p>Let <var>parameters</var> be <var>type</var>["parameters"].</p>
<li data-md>
<p>Let <var>wasmParameters</var> be «».</p>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate⑧">For each</a> <var>type</var> of <var>parameters</var>,</p>
<ol>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-append" id="ref-for-list-append①②">Append</a> <a data-link-type="dfn" href="#tovaluetype" id="ref-for-tovaluetype②">ToValueType</a>(<var>type</var>) to <var>wasmParameters</var>.</p>
</ol>
<li data-md>
<p>Let <var>store</var> be the current agent’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store②⑧">associated store</a>.</p>
<li data-md>
<p>Let (<var>store</var>, <var>tagAddress</var>) be <a data-link-type="dfn" href="#tag_alloc" id="ref-for-tag_alloc">tag_alloc</a>(<var>store</var>, <var>wasmParameters</var>).</p>
<li data-md>
<p>Set the current agent’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store②⑨">associated store</a> to <var>store</var>.</p>
<li data-md>
<p><a data-link-type="dfn" href="#initialize-a-tag-object" id="ref-for-initialize-a-tag-object①">Initialize</a> <strong>this</strong> from <var>tagAddress</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="type()" data-algorithm-for="Tag">
<p>The <dfn class="dfn-paneled idl-code" data-dfn-for="Tag" data-dfn-type="method" data-export id="dom-tag-type"><code>type()</code></dfn> method steps are:</p>
<ol>
<li data-md>
<p>Let <var>store</var> be the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent③④">surrounding agent</a>’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store③⓪">associated store</a>.</p>
<li data-md>
<p>Let <var>parameters</var> be <a data-link-type="dfn" href="#tag_parameters" id="ref-for-tag_parameters">tag_parameters</a>(<var>store</var>, <strong>this</strong>.[[Address]]).</p>
<li data-md>
<p>Let <var>idlParameters</var> be «».</p>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate⑨">For each</a> <var>type</var> of <var>parameters</var>,</p>
<ol>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-append" id="ref-for-list-append①③">Append</a> <a data-link-type="abstract-op" href="https://webassembly.github.io/js-types/js-api/#abstract-opdef-fromvaluetype" id="ref-for-abstract-opdef-fromvaluetype">FromValueType</a>(<var>type</var>) to <var>idlParameters</var>.</p>
</ol>
<li data-md>
<p>Return «[ "<code class="idl"><a data-link-type="idl" href="#dom-tagtype-parameters" id="ref-for-dom-tagtype-parameters">parameters</a></code>" → <var>idlParameters</var> ]».</p>
</ol>
<p><strong class="advisement"> This method is only expected to be implemented or shipped when both this proposal and the Type Reflection proposal are implemented or shipped (respectively).</strong></p>
</div>
<h4 class="heading settled" data-level="4.7.2" id="runtime-exceptions"><span class="secno">4.7.2. </span><span class="content">Runtime exceptions</span><a class="self-link" href="#runtime-exceptions"></a></h4>
<pre class="idl highlight def"><c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-exceptionoptions"><code><c- g>ExceptionOptions</c-></code></dfn> {
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean" id="ref-for-idl-boolean②"><c- b>boolean</c-></a> <dfn class="dfn-paneled idl-code" data-default="false" data-dfn-for="ExceptionOptions" data-dfn-type="dict-member" data-export data-type="boolean" id="dom-exceptionoptions-tracestack"><code><c- g>traceStack</c-></code></dfn> = <c- b>false</c->;
};
[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNamespace" id="ref-for-LegacyNamespace⑥"><c- g>LegacyNamespace</c-></a>=<a data-link-type="idl-name" href="#namespacedef-webassembly" id="ref-for-namespacedef-webassembly⑥"><c- n>WebAssembly</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed" id="ref-for-Exposed①"><c- g>Exposed</c-></a>=(<c- n>Window</c->,<c- n>Worker</c->,<c- n>Worklet</c->)]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="exception"><code><c- g>Exception</c-></code></dfn> {
<a class="idl-code" data-link-type="constructor" href="#dom-exception-exception" id="ref-for-dom-exception-exception"><c- g>constructor</c-></a>(<a data-link-type="idl-name" href="#tag" id="ref-for-tag④"><c- n>Tag</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="Exception/Exception(exceptionTag, payload, options), Exception/constructor(exceptionTag, payload, options), Exception/Exception(exceptionTag, payload), Exception/constructor(exceptionTag, payload)" data-dfn-type="argument" data-export id="dom-exception-exception-exceptiontag-payload-options-exceptiontag"><code><c- g>exceptionTag</c-></code></dfn>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence" id="ref-for-idl-sequence④"><c- b>sequence</c-></a>&lt;<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any⑦"><c- b>any</c-></a>> <dfn class="dfn-paneled idl-code" data-dfn-for="Exception/Exception(exceptionTag, payload, options), Exception/constructor(exceptionTag, payload, options), Exception/Exception(exceptionTag, payload), Exception/constructor(exceptionTag, payload)" data-dfn-type="argument" data-export id="dom-exception-exception-exceptiontag-payload-options-payload"><code><c- g>payload</c-></code></dfn>, <c- b>optional</c-> <a data-link-type="idl-name" href="#dictdef-exceptionoptions" id="ref-for-dictdef-exceptionoptions"><c- n>ExceptionOptions</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="Exception/Exception(exceptionTag, payload, options), Exception/constructor(exceptionTag, payload, options), Exception/Exception(exceptionTag, payload), Exception/constructor(exceptionTag, payload)" data-dfn-type="argument" data-export id="dom-exception-exception-exceptiontag-payload-options-options"><code><c- g>options</c-></code></dfn> = {});
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any⑧"><c- b>any</c-></a> <a class="idl-code" data-link-type="method" href="#dom-exception-getarg" id="ref-for-dom-exception-getarg"><c- g>getArg</c-></a>(<a data-link-type="idl-name" href="#tag" id="ref-for-tag⑤"><c- n>Tag</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="Exception/getArg(exceptionTag, index)" data-dfn-type="argument" data-export id="dom-exception-getarg-exceptiontag-index-exceptiontag"><code><c- g>exceptionTag</c-></code></dfn>, [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#EnforceRange" id="ref-for-EnforceRange⑧"><c- g>EnforceRange</c-></a>] <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long" id="ref-for-idl-unsigned-long①①"><c- b>unsigned</c-> <c- b>long</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="Exception/getArg(exceptionTag, index)" data-dfn-type="argument" data-export id="dom-exception-getarg-exceptiontag-index-index"><code><c- g>index</c-></code></dfn>);
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean" id="ref-for-idl-boolean③"><c- b>boolean</c-></a> <a class="idl-code" data-link-type="method" href="#dom-exception-is" id="ref-for-dom-exception-is"><c- g>is</c-></a>(<a data-link-type="idl-name" href="#tag" id="ref-for-tag⑥"><c- n>Tag</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="Exception/is(exceptionTag)" data-dfn-type="argument" data-export id="dom-exception-is-exceptiontag-exceptiontag"><code><c- g>exceptionTag</c-></code></dfn>);
<c- b>readonly</c-> <c- b>attribute</c-> (<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString" id="ref-for-idl-DOMString①"><c- b>DOMString</c-></a> <c- b>or</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-undefined" id="ref-for-idl-undefined①"><c- b>undefined</c-></a>) <a class="idl-code" data-link-type="attribute" data-readonly data-type="(DOMString or undefined)" href="#dom-exception-stack" id="ref-for-dom-exception-stack"><c- g>stack</c-></a>;
};
</pre>
<p>An <code class="idl"><a data-link-type="idl" href="#exception" id="ref-for-exception①">Exception</a></code> value represents an exception.</p>
<div class="algorithm" data-algorithm="create an Exception object">
<p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="create-an-exception-object">create an Exception object</dfn> from a <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-tagaddr" id="ref-for-syntax-tagaddr⑤">tag address</a> <var>tagAddress</var> and a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list⑤">list</a> of
WebAssembly values <var>payload</var>, perform the following steps:</p>
<ol>
<li data-md>
<p>Let <var>store</var> be the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent③⑤">surrounding agent</a>’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store③①">associated store</a>.</p>
<li data-md>
<p>Let <var>types</var> be <a data-link-type="dfn" href="#tag_parameters" id="ref-for-tag_parameters①">tag_parameters</a>(<var>store</var>, <var>tagAddress</var>).</p>
<li data-md>
<p class="assertion">Assert: <var>types</var>’s <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-size" id="ref-for-list-size⑤">size</a> is <var>payload</var>’s <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-size" id="ref-for-list-size⑥">size</a>.</p>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate①⓪">For each</a> <var>value</var> and <var>resultType</var> of <var>payload</var> and <var>types</var>, paired linearly,</p>
<ol>
<li data-md>
<p class="assertion">Assert: <var>value</var>’s type matches <var>resultType</var>.</p>
</ol>
<li data-md>
<p>Let <var>exception</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new⑥">new</a> <code class="idl"><a data-link-type="idl" href="#exception" id="ref-for-exception②">Exception</a></code>.</p>
<li data-md>
<p>Set <var>exception</var>.[[Type]] to <var>tagAddress</var>.</p>
<li data-md>
<p>Set <var>exception</var>.[[Payload]] to <var>payload</var>.</p>
<li data-md>
<p>Set <var>exception</var>.[[Stack]] to undefined.</p>
<li data-md>
<p>Return <var>exception</var>.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="Exception(exceptionTag, payload, options)" data-algorithm-for="Exception">
<p>The <dfn class="dfn-paneled idl-code" data-dfn-for="Exception" data-dfn-type="constructor" data-export data-lt="Exception(exceptionTag, payload, options)|constructor(exceptionTag, payload, options)|Exception(exceptionTag, payload)|constructor(exceptionTag, payload)" id="dom-exception-exception"><code>new Exception(<var>exceptionTag</var>, <var>payload</var>, <var>options</var>)</code></dfn>
constructor steps are:</p>
<ol>
<li data-md>
<p>Let <var>store</var> be the <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent" id="ref-for-surrounding-agent③⑥">surrounding agent</a>’s <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store③②">associated store</a>.</p>
<li data-md>
<p>Let <var>types</var> be <a data-link-type="dfn" href="#tag_parameters" id="ref-for-tag_parameters②">tag_parameters</a>(<var>store</var>, <var>exceptionTag</var>.[[Address]]).</p>
<li data-md>
<p>If <var>types</var>’s <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-size" id="ref-for-list-size⑦">size</a> is not <var>payload</var>’s <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-size" id="ref-for-list-size⑧">size</a>,</p>
<ol>
<li data-md>
<p>Throw a <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-typeerror" id="ref-for-sec-native-error-types-used-in-this-standard-typeerror①②">TypeError</a></code>.</p>
</ol>
<li data-md>
<p>Let <var>wasmPayload</var> be « ».</p>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate①①">For each</a> <var>value</var> and <var>resultType</var> of <var>payload</var> and <var>types</var>, paired linearly,</p>
<ol>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-append" id="ref-for-list-append①④">Append</a> ? <a data-link-type="dfn" href="#towebassemblyvalue" id="ref-for-towebassemblyvalue①①">ToWebAssemblyValue</a>(<var>value</var>, <var>resultType</var>) to <var>wasmPayload</var>.</p>
</ol>
<li data-md>
<p>Set <strong>this</strong>.[[Type]] to <var>exceptionTag</var>.[[Address]].</p>
<li data-md>
<p>Set <strong>this</strong>.[[Payload]] to <var>wasmPayload</var>.</p>
<li data-md>
<p>If <var>options</var>["traceStack"] is true,</p>
<ol>
<li data-md>
<p>Set <strong>this</strong>.[[Stack]] to either a <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-DOMString" id="ref-for-idl-DOMString②">DOMString</a></code> representation of the current call stack or undefined.</p>
</ol>
<li data-md>
<p>Otherwise,</p>
<ol>
<li data-md>
<p>Set <strong>this</strong>.[[Stack]] to undefined.</p>
</ol>
</ol>
</div>
<div class="algorithm" data-algorithm="getArg(exceptionTag, index)" data-algorithm-for="Exception">
<p>The <dfn class="dfn-paneled idl-code" data-dfn-for="Exception" data-dfn-type="method" data-export id="dom-exception-getarg"><code>getArg(<var>exceptionTag</var>, <var>index</var>)</code></dfn> method steps are:</p>
<ol>
<li data-md>
<p>If <strong>this</strong>.[[Type]] is not equal to <var>exceptionTag</var>.[[Address]],</p>
<ol>
<li data-md>
<p>Throw a <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-typeerror" id="ref-for-sec-native-error-types-used-in-this-standard-typeerror①③">TypeError</a></code>.</p>
</ol>
<li data-md>
<p>Let <var>payload</var> be <strong>this</strong>.[[Payload]].</p>
<li data-md>
<p>If <var>index</var><var>payload</var>’s <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-size" id="ref-for-list-size⑨">size</a>,</p>
<ol>
<li data-md>
<p>Throw a <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-rangeerror" id="ref-for-sec-native-error-types-used-in-this-standard-rangeerror⑧">RangeError</a></code>.</p>
</ol>
<li data-md>
<p>Return <a data-link-type="dfn" href="#tojsvalue" id="ref-for-tojsvalue⑤">ToJSValue</a>(<var>payload</var>[<var>index</var>]).</p>
</ol>
</div>
<div class="algorithm" data-algorithm="is(exceptionTag)" data-algorithm-for="Exception">
<p>The <dfn class="dfn-paneled idl-code" data-dfn-for="Exception" data-dfn-type="method" data-export id="dom-exception-is"><code>is(<var>exceptionTag</var>)</code></dfn> method steps are:</p>
<ol>
<li data-md>
<p>If <strong>this</strong>.[[Type]] is not equal to <var>exceptionTag</var>.[[Address]],</p>
<ol>
<li data-md>
<p>Return false.</p>
</ol>
<li data-md>
<p>Return true.</p>
</ol>
</div>
<div class="algorithm" data-algorithm="stack" data-algorithm-for="Exception">
<p>The <dfn class="dfn-paneled idl-code" data-dfn-for="Exception" data-dfn-type="attribute" data-export id="dom-exception-stack"><code>stack</code></dfn> getter steps are:</p>
<ol>
<li data-md>
<p>Return <strong>this</strong>.[[Stack]].</p>
</ol>
</div>
<h4 class="heading settled" data-level="4.7.3" id="js-exceptions"><span class="secno">4.7.3. </span><span class="content">JavaScript exceptions</span><a class="self-link" href="#js-exceptions"></a></h4>
<p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="javascript-exception-tag">JavaScript exception tag</dfn> is a <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-tagaddr" id="ref-for-syntax-tagaddr⑥">tag address</a> reserved by this
specification to distinguish exceptions originating from JavaScript.</p>
<p>For any <a data-link-type="dfn" href="#associated-store" id="ref-for-associated-store③③">associated store</a> <var>store</var>, the result of
<a data-link-type="dfn" href="#tag_parameters" id="ref-for-tag_parameters③">tag_parameters</a>(<var>store</var>, <a data-link-type="dfn" href="#javascript-exception-tag" id="ref-for-javascript-exception-tag①">JavaScript exception tag</a>) must be « ».</p>
<div class="algorithm" data-algorithm="throw" data-algorithm-for="WebAssembly">
<p>To <dfn class="dfn-paneled" data-dfn-for="WebAssembly" data-dfn-type="dfn" data-noexport id="webassembly-throw">throw</dfn> with a <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-tagaddr" id="ref-for-syntax-tagaddr⑦">tag address</a> <var>type</var>, a matching <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list⑥">list</a> of WebAssembly values <var>payload</var>, and an <a data-link-type="dfn" data-refhint-key="6295139b" href="https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-reftype" id="ref-for-syntax-reftype①②">externref</a> <var>opaqueData</var>, perform the following steps:</p>
<ol>
<li data-md>
<p>Unwind the stack until reaching the <em>catching try block</em> given <var>type</var>.</p>
<li data-md>
<p>Invoke the catch block with <var>payload</var> and <var>opaqueData</var>.</p>
</ol>
<p class="note" role="note"><span class="marker">Note:</span> This algorithm is expected to be moved into the core specification.</p>
</div>
<h3 class="heading settled" data-level="4.8" id="error-objects"><span class="secno">4.8. </span><span class="content">Error Objects</span><a class="self-link" href="#error-objects"></a></h3>
<p>WebAssembly defines the following Error classes: <dfn class="dfn-paneled idl-code" data-dfn-type="exception" data-export id="exceptiondef-compileerror"><code>CompileError</code></dfn>, <dfn class="dfn-paneled idl-code" data-dfn-type="exception" data-export id="exceptiondef-linkerror"><code>LinkError</code></dfn>, and <dfn class="dfn-paneled idl-code" data-dfn-type="exception" data-export id="exceptiondef-runtimeerror"><code>RuntimeError</code></dfn>.</p>
<div class="algorithm" data-algorithm="create the WebAssembly namespace object">
When the <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-namespace-object" id="ref-for-dfn-namespace-object">namespace object</a> for the <code class="idl"><a data-link-type="idl" href="#namespacedef-webassembly" id="ref-for-namespacedef-webassembly⑦">WebAssembly</a></code> namespace is <a data-link-type="dfn" href="https://heycam.github.io/webidl/#create-a-namespace-object" id="ref-for-create-a-namespace-object">created</a>, the following steps must be run:
<ol>
<li data-md>
<p>Let <var>namespaceObject</var> be the <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-namespace-object" id="ref-for-dfn-namespace-object①">namespace object</a>.</p>
<li data-md>
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate①②">For each</a> <var>error</var> of « "CompileError", "LinkError", "RuntimeError" »,</p>
<ol>
<li data-md>
<p>Let <var>constructor</var> be a new object, implementing the <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-nativeerror-object-structure" id="ref-for-sec-nativeerror-object-structure">NativeError Object Structure</a>, with <var>NativeError</var> set to <var>error</var>.</p>
<li data-md>
<p><a data-link-type="dfn" data-refhint-key="f4fa6c3b" href="https://tc39.github.io/ecma262/#sec-returnifabrupt-shorthands" id="ref-for-sec-returnifabrupt-shorthands②⓪">!</a> <u class="link-error" data-lt="CreateMethodProperty" title="LINK ERROR: No &apos;abstract-op&apos; refs found for &apos;CreateMethodProperty&apos;.">CreateMethodProperty</u>(<var>namespaceObject</var>, <var>error</var>, <var>constructor</var>).</p>
</ol>
</ol>
</div>
<p class="note" role="note"><span class="marker">Note:</span> This defines <code class="idl"><a data-link-type="idl" href="#exceptiondef-compileerror" id="ref-for-exceptiondef-compileerror②">CompileError</a></code>, <code class="idl"><a data-link-type="idl" href="#exceptiondef-linkerror" id="ref-for-exceptiondef-linkerror⑨">LinkError</a></code>, and <code class="idl"><a data-link-type="idl" href="#exceptiondef-runtimeerror" id="ref-for-exceptiondef-runtimeerror②">RuntimeError</a></code> classes on the <code class="idl"><a data-link-type="idl" href="#namespacedef-webassembly" id="ref-for-namespacedef-webassembly⑧">WebAssembly</a></code> namespace, which are produced by the APIs defined in this specification.
They expose the same interface as native JavaScript errors like <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-typeerror" id="ref-for-sec-native-error-types-used-in-this-standard-typeerror①④">TypeError</a></code> and <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-rangeerror" id="ref-for-sec-native-error-types-used-in-this-standard-rangeerror⑨">RangeError</a></code>.</p>
<p class="note" role="note"><span class="marker">Note:</span> It is not currently possible to define this behavior using Web IDL.</p>
<h2 class="heading settled" data-level="5" id="errors"><span class="secno">5. </span><span class="content">Error Condition Mappings to JavaScript</span><a class="self-link" href="#errors"></a></h2>
<p>Running WebAssembly programs encounter certain events which halt execution of the WebAssembly code.
WebAssembly code (currently)
has no way to catch these conditions and thus an exception will necessarily
propagate to the enclosing non-WebAssembly caller (whether it is a browser,
JavaScript or another runtime system) where it is handled like a normal JavaScript exception.</p>
<p>If WebAssembly calls JavaScript via import and the JavaScript throws an
exception, the exception is propagated through the WebAssembly activation to the
enclosing caller.</p>
<p>Because JavaScript exceptions can be handled, and JavaScript can continue to
call WebAssembly exports after a trap has been handled, traps do not, in
general, prevent future execution.</p>
<h3 class="heading settled" data-level="5.1" id="stack-overflow"><span class="secno">5.1. </span><span class="content">Stack Overflow</span><a class="self-link" href="#stack-overflow"></a></h3>
<p>Whenever a stack overflow occurs in
WebAssembly code, the same class of exception is thrown as for a stack overflow in
JavaScript. The particular exception here is implementation-defined in both cases.</p>
<p class="note" role="note"><span class="marker">Note:</span> ECMAScript doesn’t specify any sort of behavior on stack overflow; implementations have been observed to throw <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-rangeerror" id="ref-for-sec-native-error-types-used-in-this-standard-rangeerror①⓪">RangeError</a></code>, InternalError or Error. Any is valid here.</p>
<h3 class="heading settled" data-level="5.2" id="out-of-memory"><span class="secno">5.2. </span><span class="content">Out of Memory</span><a class="self-link" href="#out-of-memory"></a></h3>
<p>Whenever validation, compilation or instantiation run out of memory, the
same class of exception is thrown as for out of memory conditions in JavaScript.
The particular exception here is implementation-defined in both cases.</p>
<p class="note" role="note"><span class="marker">Note:</span> ECMAScript doesn’t specify any sort of behavior on out-of-memory conditions; implementations have been observed to throw OOMError and to crash. Either is valid here.</p>
<div class="issue" id="issue-7eafcf54">
<a class="self-link" href="#issue-7eafcf54"></a>
A failed allocation of a large table or memory may either result in
<ul>
<li data-md>
<p>a <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-rangeerror" id="ref-for-sec-native-error-types-used-in-this-standard-rangeerror①①">RangeError</a></code>, as specified in the <code class="idl"><a data-link-type="idl" href="#memory" id="ref-for-memory⑦">Memory</a></code> <code class="idl"><a data-link-type="idl" href="#dom-memory-grow" id="ref-for-dom-memory-grow①">grow()</a></code> and <code class="idl"><a data-link-type="idl" href="#table" id="ref-for-table⑥">Table</a></code> <code class="idl"><a data-link-type="idl" href="#dom-table-grow" id="ref-for-dom-table-grow①">grow()</a></code> operations</p>
<li data-md>
<p>returning -1 as the <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/instructions.html#exec-memory-grow" id="ref-for-exec-memory-grow①">memory.grow</a> instruction</p>
<li data-md>
<p>UA-specific OOM behavior as described in this section.</p>
</ul>
In a future revision, we may reconsider more reliable and recoverable errors for allocations of large amounts of memory.
<p>See <a href="https://github.com/WebAssembly/spec/issues/879">Issue 879</a> for further discussion.</p>
</div>
<h2 class="heading settled" data-level="6" id="limits"><span class="secno">6. </span><span class="content">Implementation-defined Limits</span><a class="self-link" href="#limits"></a></h2>
<p>The WebAssembly core specification allows an implementation to define limits on the syntactic structure of the module.
While each embedding of WebAssembly may choose to define its own limits, for predictability the standard WebAssembly JavaScript Interface described in this document defines the following exact limits.
An implementation must reject a module that exceeds one of the following limits with a <code class="idl"><a data-link-type="idl" href="#exceptiondef-compileerror" id="ref-for-exceptiondef-compileerror③">CompileError</a></code>:
In practice, an implementation may run out of resources for valid modules below these limits.</p>
<ul>
<li>The maximum size of a module is 1,073,741,824 bytes (1 GiB).
<li>The maximum number of types defined in the types section is 1,000,000.
<li>The maximum number of functions defined in a module is 1,000,000.
<li>The maximum number of imports declared in a module is 100,000.
<li>The maximum number of exports declared in a module is 100,000.
<li>The maximum number of globals defined in a module is 1,000,000.
<li>The maximum number of tags defined in a module is 1,000,000.
<li>The maximum number of data segments defined in a module is 100,000.
<li>The maximum number of tables, including declared or imported tables, is 100,000.
<li>The maximum size of a table is 10,000,000.
<li>The maximum number of table entries in any table initialization is 10,000,000.
<li>The maximum number of memories, including declared or imported memories, is 1.
<li>The maximum number of parameters to any function or block is 1,000.
<li>The maximum number of return values for any function or block is 1,000.
<li>The maximum size of a function body, including locals declarations, is 7,654,321 bytes.
<li>The maximum number of locals declared in a function, including implicitly declared as parameters, is 50,000.
</ul>
<p>An implementation must throw a <code class="idl"><a data-link-type="idl" href="#exceptiondef-runtimeerror" id="ref-for-exceptiondef-runtimeerror③">RuntimeError</a></code> if one of the following limits is exceeded during runtime:
In practice, an implementation may run out of resources for valid modules below these limits.</p>
<ul>
<li>The maximum size of a table is 10,000,000.
<li>The maximum number of pages of a memory is 65,536.
</ul>
<h2 class="heading settled" data-level="7" id="security-considerations"><span class="secno">7. </span><span class="content">Security and Privacy Considerations</span><a class="self-link" href="#security-considerations"></a></h2>
<p><em>This section is non-normative.</em></p>
<p>This document defines a host environment for WebAssembly. It enables a WebAssembly instance to <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/syntax/modules.html#syntax-import" id="ref-for-syntax-import">import</a> JavaScript objects and functions from an <a data-link-type="dfn" href="#read-the-imports" id="ref-for-read-the-imports③">import object</a>, but otherwise provides no access to the embedding environment. Thus a WebAssembly instance is bound to the same constraints as JavaScript.</p>
</main>
<div data-fill-with="conformance">
<h2 class="no-ref no-num heading settled" id="w3c-conformance"><span class="content">Conformance</span><a class="self-link" href="#w3c-conformance"></a></h2>
<h3 class="no-ref no-num heading settled" id="w3c-conventions"><span class="content">Document conventions</span><a class="self-link" href="#w3c-conventions"></a></h3>
<p>Conformance requirements are expressed
with a combination of descriptive assertions
and RFC 2119 terminology.
The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL”
in the normative parts of this document
are to be interpreted as described in RFC 2119.
However, for readability,
these words do not appear in all uppercase letters in this specification.
</p>
<p>All of the text of this specification is normative
except sections explicitly marked as non-normative, examples, and notes. <a data-link-type="biblio" href="#biblio-rfc2119" title="Key words for use in RFCs to Indicate Requirement Levels">[RFC2119]</a>
</p>
<p>Examples in this specification are introduced with the words “for example”
or are set apart from the normative text
with <code>class="example"</code>,
like this:
</p>
<div class="example" id="w3c-example">
<a class="self-link" href="#w3c-example"></a>
<p>This is an example of an informative example.
</p>
</div>
<p>Informative notes begin with the word “Note”
and are set apart from the normative text
with <code>class="note"</code>,
like this:
</p>
<p class="note" role="note">Note, this is an informative note.</p>
<section>
<h3 class="no-ref no-num heading settled" id="w3c-conformant-algorithms"><span class="content">Conformant Algorithms</span><a class="self-link" href="#w3c-conformant-algorithms"></a></h3>
<p>Requirements phrased in the imperative as part of algorithms
(such as "strip any leading space characters"
or "return false and abort these steps")
are to be interpreted with the meaning of the key word
("must", "should", "may", etc)
used in introducing the algorithm.
</p>
<p>Conformance requirements phrased as algorithms or specific steps
can be implemented in any manner,
so long as the end result is equivalent.
In particular, the algorithms defined in this specification
are intended to be easy to understand
and are not intended to be performant.
Implementers are encouraged to optimize.
</p>
</section>
</div>
<script src="https://www.w3.org/scripts/TR/2021/fixup.js"></script>
<h2 class="no-num no-ref heading settled" id="index"><span class="content">Index</span><a class="self-link" href="#index"></a></h2>
<h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="content">Terms defined by this specification</span><a class="self-link" href="#index-defined-here"></a></h3>
<ul class="index">
<li><a href="#a-new-exported-function">a new Exported Function</a><span>, in § 4.6</span>
<li>
"anyfunc"
<ul>
<li><a href="#dom-tablekind-anyfunc">enum-value for TableKind</a><span>, in § 4.4</span>
<li><a href="#dom-valuetype-anyfunc">enum-value for ValueType</a><span>, in § 4.5</span>
</ul>
<li><a href="#associated-store">associated store</a><span>, in § 3.1</span>
<li><a href="#asynchronously-compile-a-webassembly-module">asynchronously compile a WebAssembly module</a><span>, in § 4</span>
<li><a href="#asynchronously-instantiate-a-webassembly-module">asynchronously instantiate a WebAssembly module</a><span>, in § 4</span>
<li><a href="#dom-memory-buffer">buffer</a><span>, in § 4.3</span>
<li><a href="#call-an-exported-function">call an Exported Function</a><span>, in § 4.6</span>
<li><a href="#compile-a-webassembly-module">compile a WebAssembly module</a><span>, in § 4</span>
<li><a href="#dom-webassembly-compile">compile(bytes)</a><span>, in § 4</span>
<li><a href="#exceptiondef-compileerror">CompileError</a><span>, in § 4.8</span>
<li><a href="#construct-a-webassembly-module-object">construct a WebAssembly module object</a><span>, in § 4</span>
<li><a href="#dom-module-module">constructor(bytes)</a><span>, in § 4.1</span>
<li>
constructor(descriptor)
<ul>
<li><a href="#dom-global-global">constructor for Global</a><span>, in § 4.5</span>
<li><a href="#dom-memory-memory">constructor for Memory</a><span>, in § 4.3</span>
<li><a href="#dom-table-table">constructor for Table</a><span>, in § 4.4</span>
</ul>
<li><a href="#dom-global-global">constructor(descriptor, v)</a><span>, in § 4.5</span>
<li><a href="#dom-table-table">constructor(descriptor, value)</a><span>, in § 4.4</span>
<li><a href="#dom-exception-exception">constructor(exceptionTag, payload)</a><span>, in § 4.7.2</span>
<li><a href="#dom-exception-exception">constructor(exceptionTag, payload, options)</a><span>, in § 4.7.2</span>
<li><a href="#dom-instance-instance">constructor(module)</a><span>, in § 4.2</span>
<li><a href="#dom-instance-instance">constructor(module, importObject)</a><span>, in § 4.2</span>
<li><a href="#dom-tag-tag">constructor(type)</a><span>, in § 4.7.1</span>
<li><a href="#create-a-global-object">create a global object</a><span>, in § 4.5</span>
<li><a href="#create-a-host-function">create a host function</a><span>, in § 4.6</span>
<li><a href="#create-a-memory-buffer">create a memory buffer</a><span>, in § 4.3</span>
<li><a href="#create-a-memory-object">create a memory object</a><span>, in § 4.3</span>
<li><a href="#create-an-exception-object">create an Exception object</a><span>, in § 4.7.2</span>
<li><a href="#create-an-exports-object">create an exports object</a><span>, in § 4</span>
<li><a href="#create-a-table-object">create a table object</a><span>, in § 4.4</span>
<li><a href="#create-a-tag-object">create a Tag object</a><span>, in § 4.7.1</span>
<li><a href="#dom-module-customsections">customSections(moduleObject, sectionName)</a><span>, in § 4.1</span>
<li><a href="#defaultvalue">DefaultValue</a><span>, in § 4.5</span>
<li><a href="#dom-tabledescriptor-element">element</a><span>, in § 4.4</span>
<li><a href="#exception">Exception</a><span>, in § 4.7.2</span>
<li><a href="#dom-exception-exception">Exception(exceptionTag, payload)</a><span>, in § 4.7.2</span>
<li><a href="#dom-exception-exception">Exception(exceptionTag, payload, options)</a><span>, in § 4.7.2</span>
<li><a href="#dictdef-exceptionoptions">ExceptionOptions</a><span>, in § 4.7.2</span>
<li><a href="#exported-function">Exported Function</a><span>, in § 4.6</span>
<li><a href="#exported-function-cache">Exported Function cache</a><span>, in § 3.2</span>
<li><a href="#dom-instance-exports">exports</a><span>, in § 4.2</span>
<li><a href="#dom-module-exports">exports(moduleObject)</a><span>, in § 4.1</span>
<li>
"externref"
<ul>
<li><a href="#dom-tablekind-externref">enum-value for TableKind</a><span>, in § 4.4</span>
<li><a href="#dom-valuetype-externref">enum-value for ValueType</a><span>, in § 4.5</span>
</ul>
<li><a href="#extern-value-cache">Extern value cache</a><span>, in § 3.2</span>
<li><a href="#dom-valuetype-f32">"f32"</a><span>, in § 4.5</span>
<li><a href="#dom-valuetype-f64">"f64"</a><span>, in § 4.5</span>
<li><a href="#dom-importexportkind-function">"function"</a><span>, in § 4.1</span>
<li><a href="#dom-exception-getarg">getArg(exceptionTag, index)</a><span>, in § 4.7.2</span>
<li><a href="#getglobalvalue">GetGlobalValue</a><span>, in § 4.5</span>
<li><a href="#dom-table-get">get(index)</a><span>, in § 4.4</span>
<li><a href="#dom-importexportkind-global">"global"</a><span>, in § 4.1</span>
<li><a href="#global">Global</a><span>, in § 4.5</span>
<li><a href="#dom-global-global">Global(descriptor)</a><span>, in § 4.5</span>
<li><a href="#dictdef-globaldescriptor">GlobalDescriptor</a><span>, in § 4.5</span>
<li><a href="#dom-global-global">Global(descriptor, v)</a><span>, in § 4.5</span>
<li><a href="#global-object-cache">Global object cache</a><span>, in § 3.2</span>
<li>
grow(delta)
<ul>
<li><a href="#dom-memory-grow">method for Memory</a><span>, in § 4.3</span>
<li><a href="#dom-table-grow">method for Table</a><span>, in § 4.4</span>
</ul>
<li><a href="#dom-table-grow">grow(delta, value)</a><span>, in § 4.4</span>
<li><a href="#dom-valuetype-i32">"i32"</a><span>, in § 4.5</span>
<li><a href="#dom-valuetype-i64">"i64"</a><span>, in § 4.5</span>
<li><a href="#identified-with">identified with</a><span>, in § 3.1</span>
<li><a href="#enumdef-importexportkind">ImportExportKind</a><span>, in § 4.1</span>
<li><a href="#dom-module-imports">imports(moduleObject)</a><span>, in § 4.1</span>
<li><a href="#index-of-the-host-function">index of the host function</a><span>, in § 4</span>
<li>
initial
<ul>
<li><a href="#dom-memorydescriptor-initial">dict-member for MemoryDescriptor</a><span>, in § 4.3</span>
<li><a href="#dom-tabledescriptor-initial">dict-member for TableDescriptor</a><span>, in § 4.4</span>
</ul>
<li><a href="#initialize-a-global-object">initialize a global object</a><span>, in § 4.5</span>
<li><a href="#initialize-a-memory-object">initialize a memory object</a><span>, in § 4.3</span>
<li><a href="#initialize-an-instance-object">initialize an instance object</a><span>, in § 4</span>
<li><a href="#initialize-a-table-object">initialize a table object</a><span>, in § 4.4</span>
<li><a href="#initialize-a-tag-object">initialize a Tag object</a><span>, in § 4.7.1</span>
<li><a href="#instance">Instance</a><span>, in § 4.2</span>
<li><a href="#dom-webassemblyinstantiatedsource-instance">instance</a><span>, in § 4</span>
<li><a href="#dom-instance-instance">Instance(module)</a><span>, in § 4.2</span>
<li><a href="#dom-instance-instance">Instance(module, importObject)</a><span>, in § 4.2</span>
<li><a href="#instantiate-a-promise-of-a-module">instantiate a promise of a module</a><span>, in § 4</span>
<li><a href="#dom-webassembly-instantiate">instantiate(bytes)</a><span>, in § 4</span>
<li><a href="#dom-webassembly-instantiate">instantiate(bytes, importObject)</a><span>, in § 4</span>
<li><a href="#dom-webassembly-instantiate-moduleobject-importobject">instantiate(moduleObject)</a><span>, in § 4</span>
<li><a href="#dom-webassembly-instantiate-moduleobject-importobject">instantiate(moduleObject, importObject)</a><span>, in § 4</span>
<li><a href="#instantiate-the-core-of-a-webassembly-module">instantiate the core of a WebAssembly module</a><span>, in § 4</span>
<li><a href="#dom-exception-is">is(exceptionTag)</a><span>, in § 4.7.2</span>
<li><a href="#javascript-exception-tag">JavaScript exception tag</a><span>, in § 4.7.3</span>
<li>
kind
<ul>
<li><a href="#dom-moduleexportdescriptor-kind">dict-member for ModuleExportDescriptor</a><span>, in § 4.1</span>
<li><a href="#dom-moduleimportdescriptor-kind">dict-member for ModuleImportDescriptor</a><span>, in § 4.1</span>
</ul>
<li><a href="#dom-table-length">length</a><span>, in § 4.4</span>
<li><a href="#exceptiondef-linkerror">LinkError</a><span>, in § 4.8</span>
<li>
maximum
<ul>
<li><a href="#dom-memorydescriptor-maximum">dict-member for MemoryDescriptor</a><span>, in § 4.3</span>
<li><a href="#dom-tabledescriptor-maximum">dict-member for TableDescriptor</a><span>, in § 4.4</span>
</ul>
<li><a href="#dom-importexportkind-memory">"memory"</a><span>, in § 4.1</span>
<li><a href="#memory">Memory</a><span>, in § 4.3</span>
<li><a href="#dom-memory-memory">Memory(descriptor)</a><span>, in § 4.3</span>
<li><a href="#dictdef-memorydescriptor">MemoryDescriptor</a><span>, in § 4.3</span>
<li><a href="#memory-object-cache">Memory object cache</a><span>, in § 3.2</span>
<li><a href="#module">Module</a><span>, in § 4.1</span>
<li>
module
<ul>
<li><a href="#dom-moduleimportdescriptor-module">dict-member for ModuleImportDescriptor</a><span>, in § 4.1</span>
<li><a href="#dom-webassemblyinstantiatedsource-module">dict-member for WebAssemblyInstantiatedSource</a><span>, in § 4</span>
</ul>
<li><a href="#dom-module-module">Module(bytes)</a><span>, in § 4.1</span>
<li><a href="#dictdef-moduleexportdescriptor">ModuleExportDescriptor</a><span>, in § 4.1</span>
<li><a href="#dictdef-moduleimportdescriptor">ModuleImportDescriptor</a><span>, in § 4.1</span>
<li><a href="#dom-globaldescriptor-mutable">mutable</a><span>, in § 4.5</span>
<li>
name
<ul>
<li><a href="#dom-moduleexportdescriptor-name">dict-member for ModuleExportDescriptor</a><span>, in § 4.1</span>
<li><a href="#dom-moduleimportdescriptor-name">dict-member for ModuleImportDescriptor</a><span>, in § 4.1</span>
</ul>
<li><a href="#name-of-the-webassembly-function">name of the WebAssembly function</a><span>, in § 4.6</span>
<li><a href="#dom-tagtype-parameters">parameters</a><span>, in § 4.7.1</span>
<li><a href="#read-the-imports">read the imports</a><span>, in § 4</span>
<li><a href="#reset-the-memory-buffer">reset the Memory buffer</a><span>, in § 4.3</span>
<li><a href="#retrieving-an-extern-value">retrieving an extern value</a><span>, in § 4.6</span>
<li><a href="#run-a-host-function">run a host function</a><span>, in § 4.6</span>
<li><a href="#exceptiondef-runtimeerror">RuntimeError</a><span>, in § 4.8</span>
<li><a href="#dom-table-set">set(index)</a><span>, in § 4.4</span>
<li><a href="#dom-table-set">set(index, value)</a><span>, in § 4.4</span>
<li><a href="#dom-exception-stack">stack</a><span>, in § 4.7.2</span>
<li><a href="#string-value-of-the-extern-type">string value of the extern type</a><span>, in § 4.1</span>
<li><a href="#synchronously-instantiate-a-webassembly-module">synchronously instantiate a WebAssembly module</a><span>, in § 4</span>
<li><a href="#dom-importexportkind-table">"table"</a><span>, in § 4.1</span>
<li><a href="#table">Table</a><span>, in § 4.4</span>
<li><a href="#dom-table-table">Table(descriptor)</a><span>, in § 4.4</span>
<li><a href="#dictdef-tabledescriptor">TableDescriptor</a><span>, in § 4.4</span>
<li><a href="#dom-table-table">Table(descriptor, value)</a><span>, in § 4.4</span>
<li><a href="#enumdef-tablekind">TableKind</a><span>, in § 4.4</span>
<li><a href="#table-object-cache">Table object cache</a><span>, in § 3.2</span>
<li><a href="#dom-importexportkind-tag">"tag"</a><span>, in § 4.1</span>
<li><a href="#tag">Tag</a><span>, in § 4.7.1</span>
<li><a href="#tag_alloc">tag_alloc</a><span>, in § 4.7</span>
<li><a href="#tag-object-cache">Tag object cache</a><span>, in § 3.2</span>
<li><a href="#tag_parameters">tag_parameters</a><span>, in § 4.7</span>
<li><a href="#dom-tag-tag">Tag(type)</a><span>, in § 4.7.1</span>
<li><a href="#dictdef-tagtype">TagType</a><span>, in § 4.7.1</span>
<li><a href="#webassembly-throw">throw</a><span>, in § 4.7.3</span>
<li><a href="#tojsvalue">ToJSValue</a><span>, in § 4.6</span>
<li><a href="#tovaluetype">ToValueType</a><span>, in § 4.5</span>
<li><a href="#towebassemblyvalue">ToWebAssemblyValue</a><span>, in § 4.6</span>
<li><a href="#dom-exceptionoptions-tracestack">traceStack</a><span>, in § 4.7.2</span>
<li><a href="#dom-tag-type">type()</a><span>, in § 4.7.1</span>
<li><a href="#dom-valuetype-v128">"v128"</a><span>, in § 4.5</span>
<li><a href="#dom-webassembly-validate">validate(bytes)</a><span>, in § 4</span>
<li>
value
<ul>
<li><a href="#dom-global-value">attribute for Global</a><span>, in § 4.5</span>
<li><a href="#dom-globaldescriptor-value">dict-member for GlobalDescriptor</a><span>, in § 4.5</span>
</ul>
<li><a href="#dom-global-valueof">valueOf()</a><span>, in § 4.5</span>
<li><a href="#enumdef-valuetype">ValueType</a><span>, in § 4.5</span>
<li><a href="#namespacedef-webassembly">WebAssembly</a><span>, in § 4</span>
<li><a href="#dictdef-webassemblyinstantiatedsource">WebAssemblyInstantiatedSource</a><span>, in § 4</span>
</ul>
<h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span class="content">Terms defined by reference</span><a class="self-link" href="#index-defined-elsewhere"></a></h3>
<ul class="index">
<li>
<a data-link-type="biblio">[ECMASCRIPT]</a> defines the following terms:
<ul>
<li><span class="dfn-paneled" id="cd4b1dc4">!</span>
<li><span class="dfn-paneled" id="ebb4ace3">?</span>
<li><span class="dfn-paneled" id="f17862f0">ArrayBuffer</span>
<li><span class="dfn-paneled" id="81131be0">Call</span>
<li><span class="dfn-paneled" id="4c6c6f05">CreateArrayFromList</span>
<li><span class="dfn-paneled" id="6df10f44">CreateBuiltinFunction</span>
<li><span class="dfn-paneled" id="d2c61922">CreateDataProperty</span>
<li><span class="dfn-paneled" id="d7a47d32">DetachArrayBuffer</span>
<li><span class="dfn-paneled" id="abf85593">Get</span>
<li><span class="dfn-paneled" id="5b7339ce">GetMethod</span>
<li><span class="dfn-paneled" id="dc07163b">IsCallable</span>
<li><span class="dfn-paneled" id="e2fb14e5">NumericToRawBytes</span>
<li><span class="dfn-paneled" id="ebbbef34">OrdinaryObjectCreate</span>
<li><span class="dfn-paneled" id="43564950">RangeError</span>
<li><span class="dfn-paneled" id="369594bc">SetIntegrityLevel</span>
<li><span class="dfn-paneled" id="b29f5d72">ToBigInt64</span>
<li><span class="dfn-paneled" id="06f63be9">ToInt32</span>
<li><span class="dfn-paneled" id="9ab06711">ToNumber</span>
<li><span class="dfn-paneled" id="4a854a91">ToString</span>
<li><span class="dfn-paneled" id="58788f9d">TypeError</span>
<li><span class="dfn-paneled" id="fa5c4242">agent cluster</span>
<li><span class="dfn-paneled" id="e8f0aed3">Built-in Function Objects</span>
<li><span class="dfn-paneled" id="b107f911">current Realm</span>
<li><span class="dfn-paneled" id="eca66c99">Data Block</span>
<li><span class="dfn-paneled" id="f9dbc1a8">NativeError Object Structure</span>
<li><span class="dfn-paneled" id="4ad913ae">surrounding agent</span>
<li><span class="dfn-paneled" id="c4df1374">Type</span>
<li><span class="dfn-paneled" id="8b2a5c87"></span>
<li><span class="dfn-paneled" id="c3b271ac">𝔽</span>
</ul>
<li>
<a data-link-type="biblio">[ENCODING]</a> defines the following terms:
<ul>
<li><span class="dfn-paneled" id="f256859a">UTF-8 decode without BOM or fail</span>
</ul>
<li>
<a data-link-type="biblio">[HTML]</a> defines the following terms:
<ul>
<li><span class="dfn-paneled" id="3134c785">agent</span>
<li><span class="dfn-paneled" id="d5ac3b38">clean up after running a callback</span>
<li><span class="dfn-paneled" id="b6a1ae3f">clean up after running script</span>
<li><span class="dfn-paneled" id="a72449dd">in parallel</span>
<li><span class="dfn-paneled" id="d7af7adc">incumbent settings object</span>
<li><span class="dfn-paneled" id="b5c3b552">prepare to run a callback</span>
<li><span class="dfn-paneled" id="c2359c09">prepare to run script</span>
<li><span class="dfn-paneled" id="9a517a7d">queue a task</span>
<li><span class="dfn-paneled" id="7deb6835">settings object</span>
<li><span class="dfn-paneled" id="c3b2d08c">task source</span>
</ul>
<li>
<a data-link-type="biblio">[INFRA]</a> defines the following terms:
<ul>
<li><span class="dfn-paneled" id="53275e46">append</span>
<li><span class="dfn-paneled" id="1243a891">exist</span>
<li><span class="dfn-paneled" id="6b815fdd">is empty</span>
<li><span class="dfn-paneled" id="f02cd417">iterate</span>
<li><span class="dfn-paneled" id="649608b9">list</span>
<li><span class="dfn-paneled" id="84b454ff">ordered map</span>
<li><span class="dfn-paneled" id="0e6b2056">set</span>
<li><span class="dfn-paneled" id="0204d188">size</span>
</ul>
<li>
<a data-link-type="biblio">[WEBASSEMBLY]</a> defines the following terms:
<ul>
<li><span class="dfn-paneled" id="5c12909f">+∞</span>
<li><span class="dfn-paneled" id="23ad85cd">address</span>
<li><span class="dfn-paneled" id="105d3812">canon</span>
<li><span class="dfn-paneled" id="44f9892e">const</span>
<li><span class="dfn-paneled" id="bf58abd6">current frame</span>
<li><span class="dfn-paneled" id="3854fb40">custom section</span>
<li><span class="dfn-paneled" id="a77ae14e">customsec</span>
<li><span class="dfn-paneled" id="7b8e6024">error</span>
<li><span class="dfn-paneled" id="cf03009b">exception</span>
<li><span class="dfn-paneled" id="e8d18dfd">extern address</span>
<li><span class="dfn-paneled" id="ba26917b">external value</span>
<li><span class="dfn-paneled" id="3b0b30b1">externref</span>
<li><span class="dfn-paneled" id="17ff3dca">f32</span>
<li><span class="dfn-paneled" id="061511d8">f32.const</span>
<li><span class="dfn-paneled" id="24ed9d2a">f64</span>
<li><span class="dfn-paneled" id="49619d48">f64.const</span>
<li><span class="dfn-paneled" id="d62c469f">func</span>
<li><span class="dfn-paneled" id="a32d22b4">func_alloc</span>
<li><span class="dfn-paneled" id="a77af972">func_invoke</span>
<li><span class="dfn-paneled" id="3e98617e">func_type</span>
<li><span class="dfn-paneled" id="02fc9e53">funcref</span>
<li><span class="dfn-paneled" id="adad4e58">function address</span>
<li><span class="dfn-paneled" id="838fa205">global</span>
<li><span class="dfn-paneled" id="51ef9bb0">global address</span>
<li><span class="dfn-paneled" id="ba0496a7">global instance</span>
<li><span class="dfn-paneled" id="6cb38c36">global_alloc</span>
<li><span class="dfn-paneled" id="95835c10">global_read</span>
<li><span class="dfn-paneled" id="6feb8340">global_type</span>
<li><span class="dfn-paneled" id="b179eb48">global_write</span>
<li><span class="dfn-paneled" id="dedcd6a0">host function</span>
<li><span class="dfn-paneled" id="1918480b">i32</span>
<li><span class="dfn-paneled" id="dff98a97">i32.const</span>
<li><span class="dfn-paneled" id="69e1103d">i64</span>
<li><span class="dfn-paneled" id="16243635">i64.const</span>
<li><span class="dfn-paneled" id="5b5b2d29">import</span>
<li><span class="dfn-paneled" id="3718136b">imports</span>
<li><span class="dfn-paneled" id="ff7a2887">instance_export</span>
<li><span class="dfn-paneled" id="230965d3">mem</span>
<li><span class="dfn-paneled" id="26c6c228">mem_alloc</span>
<li><span class="dfn-paneled" id="71df74cb">mem_grow</span>
<li><span class="dfn-paneled" id="6c06c4bd">mem_size</span>
<li><span class="dfn-paneled" id="b46548cb">memaddrs</span>
<li><span class="dfn-paneled" id="f828fc68">memory address</span>
<li><span class="dfn-paneled" id="02fa4741">memory instance</span>
<li><span class="dfn-paneled" id="82f68830">memory.grow</span>
<li><span class="dfn-paneled" id="255472e5">module</span>
<li><span class="dfn-paneled" id="5c956d15">module <small>(for frame)</small></span>
<li><span class="dfn-paneled" id="4db6e00c">module grammar</span>
<li><span class="dfn-paneled" id="d724c2ce">module_decode</span>
<li><span class="dfn-paneled" id="03b42059">module_exports</span>
<li><span class="dfn-paneled" id="1188c903">module_imports</span>
<li><span class="dfn-paneled" id="45d8d6e9">module_instantiate</span>
<li><span class="dfn-paneled" id="8bccf30f">module_validate</span>
<li><span class="dfn-paneled" id="d7b1f215">nan</span>
<li><span class="dfn-paneled" id="9291eb1c">ref.extern</span>
<li><span class="dfn-paneled" id="4f0eba03">ref.func</span>
<li><span class="dfn-paneled" id="6ef486fb">ref.null</span>
<li><span class="dfn-paneled" id="c2033417">reftype</span>
<li><span class="dfn-paneled" id="ec6fe07e">sequence</span>
<li><span class="dfn-paneled" id="ce974fac">signed_32</span>
<li><span class="dfn-paneled" id="a20d03f5">signed_64</span>
<li><span class="dfn-paneled" id="8649e124">signif</span>
<li><span class="dfn-paneled" id="a414795d">store</span>
<li><span class="dfn-paneled" id="366977dd">store_init</span>
<li><span class="dfn-paneled" id="73c746e9">table</span>
<li><span class="dfn-paneled" id="40217ce1">table address</span>
<li><span class="dfn-paneled" id="7fdb209e">table instance</span>
<li><span class="dfn-paneled" id="222193f2">table type</span>
<li><span class="dfn-paneled" id="c8a48e34">table_alloc</span>
<li><span class="dfn-paneled" id="da3b3eb5">table_grow</span>
<li><span class="dfn-paneled" id="0f1fd09e">table_read</span>
<li><span class="dfn-paneled" id="19b5bb37">table_size</span>
<li><span class="dfn-paneled" id="660d1674">table_type</span>
<li><span class="dfn-paneled" id="4529c626">table_write</span>
<li><span class="dfn-paneled" id="6aa6ca82">tag <small>(for external value)</small></span>
<li><span class="dfn-paneled" id="7638a6c8">tag <small>(for externtype)</small></span>
<li><span class="dfn-paneled" id="fe361a62">tag address</span>
<li><span class="dfn-paneled" id="4e1a8ff3">v128</span>
<li><span class="dfn-paneled" id="98663f63">v128.const</span>
<li><span class="dfn-paneled" id="c8ecd3b3">valid</span>
<li><span class="dfn-paneled" id="41a5a9e9">var</span>
<li><span class="dfn-paneled" id="6e99dd75">WebAssembly module validation</span>
<li><span class="dfn-paneled" id="42d05323">WebAssembly value</span>
<li><span class="dfn-paneled" id="b265d014">−∞</span>
</ul>
<li>
<a data-link-type="biblio">[WEBASSEMBLY JS API (JS TYPE REFLECTION)]</a> defines the following terms:
<ul>
<li><span class="dfn-paneled" id="4f6ab535">FromValueType</span>
</ul>
<li>
<a data-link-type="biblio">[WEBIDL]</a> defines the following terms:
<ul>
<li><span class="dfn-paneled" id="3aff2fb3">BufferSource</span>
<li><span class="dfn-paneled" id="8855a9aa">DOMString</span>
<li><span class="dfn-paneled" id="c01cbda0">EnforceRange</span>
<li><span class="dfn-paneled" id="889e932f">Exposed</span>
<li><span class="dfn-paneled" id="f98ab0c2">LegacyNamespace</span>
<li><span class="dfn-paneled" id="bdbd19d1">Promise</span>
<li><span class="dfn-paneled" id="b0d7f3c3">USVString</span>
<li><span class="dfn-paneled" id="dacde8b5">a new promise</span>
<li><span class="dfn-paneled" id="6c6b1005">any</span>
<li><span class="dfn-paneled" id="3e180d35">associated realm</span>
<li><span class="dfn-paneled" id="5372cca8">boolean</span>
<li><span class="dfn-paneled" id="bb8f2f23">create a namespace object</span>
<li><span class="dfn-paneled" id="92d13070">get a copy of the buffer source</span>
<li><span class="dfn-paneled" id="a32c65d4">implements</span>
<li><span class="dfn-paneled" id="60e61e1a">namespace object</span>
<li><span class="dfn-paneled" id="56f81a8e">new</span>
<li><span class="dfn-paneled" id="efd1ec5d">object</span>
<li><span class="dfn-paneled" id="b262501e">reject</span>
<li><span class="dfn-paneled" id="3b90bdcd">resolve</span>
<li><span class="dfn-paneled" id="9cce47fd">sequence</span>
<li><span class="dfn-paneled" id="5f90bbfb">undefined</span>
<li><span class="dfn-paneled" id="e97a9688">unsigned long</span>
<li><span class="dfn-paneled" id="24bd7d25">upon fulfillment</span>
<li><span class="dfn-paneled" id="f14ed351">upon rejection</span>
</ul>
</ul>
<h2 class="no-num no-ref heading settled" id="references"><span class="content">References</span><a class="self-link" href="#references"></a></h2>
<h3 class="no-num no-ref heading settled" id="normative"><span class="content">Normative References</span><a class="self-link" href="#normative"></a></h3>
<dl>
<dt id="biblio-ecmascript">[ECMASCRIPT]
<dd><a href="https://tc39.es/ecma262/multipage/"><cite>ECMAScript Language Specification</cite></a>. URL: <a href="https://tc39.es/ecma262/multipage/">https://tc39.es/ecma262/multipage/</a>
<dt id="biblio-encoding">[ENCODING]
<dd>Anne van Kesteren. <a href="https://encoding.spec.whatwg.org/"><cite>Encoding Standard</cite></a>. Living Standard. URL: <a href="https://encoding.spec.whatwg.org/">https://encoding.spec.whatwg.org/</a>
<dt id="biblio-html">[HTML]
<dd>Anne van Kesteren; et al. <a href="https://html.spec.whatwg.org/multipage/"><cite>HTML Standard</cite></a>. Living Standard. URL: <a href="https://html.spec.whatwg.org/multipage/">https://html.spec.whatwg.org/multipage/</a>
<dt id="biblio-infra">[INFRA]
<dd>Anne van Kesteren; Domenic Denicola. <a href="https://infra.spec.whatwg.org/"><cite>Infra Standard</cite></a>. Living Standard. URL: <a href="https://infra.spec.whatwg.org/">https://infra.spec.whatwg.org/</a>
<dt id="biblio-rfc2119">[RFC2119]
<dd>S. Bradner. <a href="https://datatracker.ietf.org/doc/html/rfc2119"><cite>Key words for use in RFCs to Indicate Requirement Levels</cite></a>. March 1997. Best Current Practice. URL: <a href="https://datatracker.ietf.org/doc/html/rfc2119">https://datatracker.ietf.org/doc/html/rfc2119</a>
<dt id="biblio-webassembly">[WEBASSEMBLY]
<dd><a href="https://webassembly.github.io/spec/core/"><cite>WebAssembly Core Specification</cite></a>. Draft. URL: <a href="https://webassembly.github.io/spec/core/">https://webassembly.github.io/spec/core/</a>
<dt id="biblio-webidl">[WEBIDL]
<dd>Edgar Chen; Timothy Gu. <a href="https://webidl.spec.whatwg.org/"><cite>Web IDL Standard</cite></a>. Living Standard. URL: <a href="https://webidl.spec.whatwg.org/">https://webidl.spec.whatwg.org/</a>
</dl>
<h3 class="no-num no-ref heading settled" id="informative"><span class="content">Informative References</span><a class="self-link" href="#informative"></a></h3>
<dl>
<dt id="biblio-ieee-754">[IEEE-754]
<dd><a href="https://ieeexplore.ieee.org/document/8766229"><cite>IEEE Standard for Floating-Point Arithmetic</cite></a>. 22 July 2019. URL: <a href="https://ieeexplore.ieee.org/document/8766229">https://ieeexplore.ieee.org/document/8766229</a>
</dl>
<h2 class="no-num no-ref heading settled" id="idl-index"><span class="content">IDL Index</span><a class="self-link" href="#idl-index"></a></h2>
<pre class="idl highlight def"><c- b>dictionary</c-> <a href="#dictdef-webassemblyinstantiatedsource"><code><c- g>WebAssemblyInstantiatedSource</c-></code></a> {
<c- b>required</c-> <a data-link-type="idl-name" href="#module"><c- n>Module</c-></a> <a data-type="Module" href="#dom-webassemblyinstantiatedsource-module"><code><c- g>module</c-></code></a>;
<c- b>required</c-> <a data-link-type="idl-name" href="#instance"><c- n>Instance</c-></a> <a data-type="Instance" href="#dom-webassemblyinstantiatedsource-instance"><code><c- g>instance</c-></code></a>;
};
[Exposed=*]
<c- b>namespace</c-> <a href="#namespacedef-webassembly"><code><c- g>WebAssembly</c-></code></a> {
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean"><c- b>boolean</c-></a> <a class="idl-code" data-link-type="method" href="#dom-webassembly-validate"><c- g>validate</c-></a>(<a data-link-type="idl-name" href="https://webidl.spec.whatwg.org/#BufferSource"><c- n>BufferSource</c-></a> <a href="#dom-webassembly-validate-bytes-bytes"><code><c- g>bytes</c-></code></a>);
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-promise"><c- b>Promise</c-></a>&lt;<a data-link-type="idl-name" href="#module"><c- n>Module</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-webassembly-compile"><c- g>compile</c-></a>(<a data-link-type="idl-name" href="https://webidl.spec.whatwg.org/#BufferSource"><c- n>BufferSource</c-></a> <a href="#dom-webassembly-compile-bytes-bytes"><code><c- g>bytes</c-></code></a>);
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-promise"><c- b>Promise</c-></a>&lt;<a data-link-type="idl-name" href="#dictdef-webassemblyinstantiatedsource"><c- n>WebAssemblyInstantiatedSource</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-webassembly-instantiate"><c- g>instantiate</c-></a>(
<a data-link-type="idl-name" href="https://webidl.spec.whatwg.org/#BufferSource"><c- n>BufferSource</c-></a> <a href="#dom-webassembly-instantiate-bytes-importobject-bytes"><code><c- g>bytes</c-></code></a>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-object"><c- b>object</c-></a> <a href="#dom-webassembly-instantiate-bytes-importobject-importobject"><code><c- g>importObject</c-></code></a>);
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-promise"><c- b>Promise</c-></a>&lt;<a data-link-type="idl-name" href="#instance"><c- n>Instance</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-webassembly-instantiate-moduleobject-importobject"><c- g>instantiate</c-></a>(
<a data-link-type="idl-name" href="#module"><c- n>Module</c-></a> <a href="#dom-webassembly-instantiate-moduleobject-importobject-moduleobject"><code><c- g>moduleObject</c-></code></a>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-object"><c- b>object</c-></a> <a href="#dom-webassembly-instantiate-moduleobject-importobject-importobject"><code><c- g>importObject</c-></code></a>);
};
<c- b>enum</c-> <a href="#enumdef-importexportkind"><code><c- g>ImportExportKind</c-></code></a> {
<a href="#dom-importexportkind-function"><code><c- s>"function"</c-></code></a>,
<a href="#dom-importexportkind-table"><code><c- s>"table"</c-></code></a>,
<a href="#dom-importexportkind-memory"><code><c- s>"memory"</c-></code></a>,
<a href="#dom-importexportkind-global"><code><c- s>"global"</c-></code></a>,
<a href="#dom-importexportkind-tag"><code><c- s>"tag"</c-></code></a>
};
<c- b>dictionary</c-> <a href="#dictdef-moduleexportdescriptor"><code><c- g>ModuleExportDescriptor</c-></code></a> {
<c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-USVString"><c- b>USVString</c-></a> <a data-type="USVString" href="#dom-moduleexportdescriptor-name"><code><c- g>name</c-></code></a>;
<c- b>required</c-> <a data-link-type="idl-name" href="#enumdef-importexportkind"><c- n>ImportExportKind</c-></a> <a data-type="ImportExportKind" href="#dom-moduleexportdescriptor-kind"><code><c- g>kind</c-></code></a>;
// Note: Other fields such as signature may be added in the future.
};
<c- b>dictionary</c-> <a href="#dictdef-moduleimportdescriptor"><code><c- g>ModuleImportDescriptor</c-></code></a> {
<c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-USVString"><c- b>USVString</c-></a> <a data-type="USVString" href="#dom-moduleimportdescriptor-module"><code><c- g>module</c-></code></a>;
<c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-USVString"><c- b>USVString</c-></a> <a data-type="USVString" href="#dom-moduleimportdescriptor-name"><code><c- g>name</c-></code></a>;
<c- b>required</c-> <a data-link-type="idl-name" href="#enumdef-importexportkind"><c- n>ImportExportKind</c-></a> <a data-type="ImportExportKind" href="#dom-moduleimportdescriptor-kind"><code><c- g>kind</c-></code></a>;
};
[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNamespace"><c- g>LegacyNamespace</c-></a>=<a data-link-type="idl-name" href="#namespacedef-webassembly"><c- n>WebAssembly</c-></a>, Exposed=*]
<c- b>interface</c-> <a href="#module"><code><c- g>Module</c-></code></a> {
<a class="idl-code" data-link-type="constructor" href="#dom-module-module"><c- g>constructor</c-></a>(<a data-link-type="idl-name" href="https://webidl.spec.whatwg.org/#BufferSource"><c- n>BufferSource</c-></a> <a href="#dom-module-module-bytes-bytes"><code><c- g>bytes</c-></code></a>);
<c- b>static</c-> <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence"><c- b>sequence</c-></a>&lt;<a data-link-type="idl-name" href="#dictdef-moduleexportdescriptor"><c- n>ModuleExportDescriptor</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-module-exports"><c- g>exports</c-></a>(<a data-link-type="idl-name" href="#module"><c- n>Module</c-></a> <a href="#dom-module-exports-moduleobject-moduleobject"><code><c- g>moduleObject</c-></code></a>);
<c- b>static</c-> <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence"><c- b>sequence</c-></a>&lt;<a data-link-type="idl-name" href="#dictdef-moduleimportdescriptor"><c- n>ModuleImportDescriptor</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-module-imports"><c- g>imports</c-></a>(<a data-link-type="idl-name" href="#module"><c- n>Module</c-></a> <a href="#dom-module-imports-moduleobject-moduleobject"><code><c- g>moduleObject</c-></code></a>);
<c- b>static</c-> <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence"><c- b>sequence</c-></a>&lt;<a class="idl-code" data-link-type="interface" href="https://tc39.github.io/ecma262/#sec-arraybuffer-objects"><c- b>ArrayBuffer</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-module-customsections"><c- g>customSections</c-></a>(<a data-link-type="idl-name" href="#module"><c- n>Module</c-></a> <a href="#dom-module-customsections-moduleobject-sectionname-moduleobject"><code><c- g>moduleObject</c-></code></a>, <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString"><c- b>DOMString</c-></a> <a href="#dom-module-customsections-moduleobject-sectionname-sectionname"><code><c- g>sectionName</c-></code></a>);
};
[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNamespace"><c- g>LegacyNamespace</c-></a>=<a data-link-type="idl-name" href="#namespacedef-webassembly"><c- n>WebAssembly</c-></a>, Exposed=*]
<c- b>interface</c-> <a href="#instance"><code><c- g>Instance</c-></code></a> {
<a class="idl-code" data-link-type="constructor" href="#dom-instance-instance"><c- g>constructor</c-></a>(<a data-link-type="idl-name" href="#module"><c- n>Module</c-></a> <a href="#dom-instance-instance-module-importobject-module"><code><c- g>module</c-></code></a>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-object"><c- b>object</c-></a> <a href="#dom-instance-instance-module-importobject-importobject"><code><c- g>importObject</c-></code></a>);
<c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-object"><c- b>object</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="object" href="#dom-instance-exports"><c- g>exports</c-></a>;
};
<c- b>dictionary</c-> <a href="#dictdef-memorydescriptor"><code><c- g>MemoryDescriptor</c-></code></a> {
<c- b>required</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#EnforceRange"><c- g>EnforceRange</c-></a>] <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long"><c- b>unsigned</c-> <c- b>long</c-></a> <a data-type="unsigned long" href="#dom-memorydescriptor-initial"><code><c- g>initial</c-></code></a>;
[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#EnforceRange"><c- g>EnforceRange</c-></a>] <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long"><c- b>unsigned</c-> <c- b>long</c-></a> <a data-type="unsigned long" href="#dom-memorydescriptor-maximum"><code><c- g>maximum</c-></code></a>;
};
[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNamespace"><c- g>LegacyNamespace</c-></a>=<a data-link-type="idl-name" href="#namespacedef-webassembly"><c- n>WebAssembly</c-></a>, Exposed=*]
<c- b>interface</c-> <a href="#memory"><code><c- g>Memory</c-></code></a> {
<a class="idl-code" data-link-type="constructor" href="#dom-memory-memory"><c- g>constructor</c-></a>(<a data-link-type="idl-name" href="#dictdef-memorydescriptor"><c- n>MemoryDescriptor</c-></a> <a href="#dom-memory-memory-descriptor-descriptor"><code><c- g>descriptor</c-></code></a>);
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long"><c- b>unsigned</c-> <c- b>long</c-></a> <a class="idl-code" data-link-type="method" href="#dom-memory-grow"><c- g>grow</c-></a>([<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#EnforceRange"><c- g>EnforceRange</c-></a>] <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long"><c- b>unsigned</c-> <c- b>long</c-></a> <a href="#dom-memory-grow-delta-delta"><code><c- g>delta</c-></code></a>);
<c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://tc39.github.io/ecma262/#sec-arraybuffer-objects"><c- b>ArrayBuffer</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="ArrayBuffer" href="#dom-memory-buffer"><c- g>buffer</c-></a>;
};
<c- b>enum</c-> <a href="#enumdef-tablekind"><code><c- g>TableKind</c-></code></a> {
<a href="#dom-tablekind-externref"><code><c- s>"externref"</c-></code></a>,
<a href="#dom-tablekind-anyfunc"><code><c- s>"anyfunc"</c-></code></a>,
// Note: More values may be added in future iterations,
// e.g., typed function references, typed GC references
};
<c- b>dictionary</c-> <a href="#dictdef-tabledescriptor"><code><c- g>TableDescriptor</c-></code></a> {
<c- b>required</c-> <a data-link-type="idl-name" href="#enumdef-tablekind"><c- n>TableKind</c-></a> <a data-type="TableKind" href="#dom-tabledescriptor-element"><code><c- g>element</c-></code></a>;
<c- b>required</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#EnforceRange"><c- g>EnforceRange</c-></a>] <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long"><c- b>unsigned</c-> <c- b>long</c-></a> <a data-type="unsigned long" href="#dom-tabledescriptor-initial"><code><c- g>initial</c-></code></a>;
[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#EnforceRange"><c- g>EnforceRange</c-></a>] <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long"><c- b>unsigned</c-> <c- b>long</c-></a> <a data-type="unsigned long" href="#dom-tabledescriptor-maximum"><code><c- g>maximum</c-></code></a>;
};
[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNamespace"><c- g>LegacyNamespace</c-></a>=<a data-link-type="idl-name" href="#namespacedef-webassembly"><c- n>WebAssembly</c-></a>, Exposed=*]
<c- b>interface</c-> <a href="#table"><code><c- g>Table</c-></code></a> {
<a class="idl-code" data-link-type="constructor" href="#dom-table-table"><c- g>constructor</c-></a>(<a data-link-type="idl-name" href="#dictdef-tabledescriptor"><c- n>TableDescriptor</c-></a> <a href="#dom-table-table-descriptor-value-descriptor"><code><c- g>descriptor</c-></code></a>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-table-table-descriptor-value-value"><code><c- g>value</c-></code></a>);
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long"><c- b>unsigned</c-> <c- b>long</c-></a> <a class="idl-code" data-link-type="method" href="#dom-table-grow"><c- g>grow</c-></a>([<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#EnforceRange"><c- g>EnforceRange</c-></a>] <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long"><c- b>unsigned</c-> <c- b>long</c-></a> <a href="#dom-table-grow-delta-value-delta"><code><c- g>delta</c-></code></a>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-table-grow-delta-value-value"><code><c- g>value</c-></code></a>);
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a class="idl-code" data-link-type="method" href="#dom-table-get"><c- g>get</c-></a>([<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#EnforceRange"><c- g>EnforceRange</c-></a>] <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long"><c- b>unsigned</c-> <c- b>long</c-></a> <a href="#dom-table-get-index-index"><code><c- g>index</c-></code></a>);
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-undefined"><c- b>undefined</c-></a> <a class="idl-code" data-link-type="method" href="#dom-table-set"><c- g>set</c-></a>([<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#EnforceRange"><c- g>EnforceRange</c-></a>] <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long"><c- b>unsigned</c-> <c- b>long</c-></a> <a href="#dom-table-set-index-value-index"><code><c- g>index</c-></code></a>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-table-set-index-value-value"><code><c- g>value</c-></code></a>);
<c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long"><c- b>unsigned</c-> <c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="unsigned long" href="#dom-table-length"><c- g>length</c-></a>;
};
<c- b>enum</c-> <a href="#enumdef-valuetype"><code><c- g>ValueType</c-></code></a> {
<a href="#dom-valuetype-i32"><code><c- s>"i32"</c-></code></a>,
<a href="#dom-valuetype-i64"><code><c- s>"i64"</c-></code></a>,
<a href="#dom-valuetype-f32"><code><c- s>"f32"</c-></code></a>,
<a href="#dom-valuetype-f64"><code><c- s>"f64"</c-></code></a>,
<a href="#dom-valuetype-v128"><code><c- s>"v128"</c-></code></a>,
<a href="#dom-valuetype-externref"><code><c- s>"externref"</c-></code></a>,
<a href="#dom-valuetype-anyfunc"><code><c- s>"anyfunc"</c-></code></a>,
};
<c- b>dictionary</c-> <a href="#dictdef-globaldescriptor"><code><c- g>GlobalDescriptor</c-></code></a> {
<c- b>required</c-> <a data-link-type="idl-name" href="#enumdef-valuetype"><c- n>ValueType</c-></a> <a data-type="ValueType" href="#dom-globaldescriptor-value"><code><c- g>value</c-></code></a>;
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean"><c- b>boolean</c-></a> <a data-default="false" data-type="boolean" href="#dom-globaldescriptor-mutable"><code><c- g>mutable</c-></code></a> = <c- b>false</c->;
};
[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNamespace"><c- g>LegacyNamespace</c-></a>=<a data-link-type="idl-name" href="#namespacedef-webassembly"><c- n>WebAssembly</c-></a>, Exposed=*]
<c- b>interface</c-> <a href="#global"><code><c- g>Global</c-></code></a> {
<a class="idl-code" data-link-type="constructor" href="#dom-global-global"><c- g>constructor</c-></a>(<a data-link-type="idl-name" href="#dictdef-globaldescriptor"><c- n>GlobalDescriptor</c-></a> <a href="#dom-global-global-descriptor-v-descriptor"><code><c- g>descriptor</c-></code></a>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-global-global-descriptor-v-v"><code><c- g>v</c-></code></a>);
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a class="idl-code" data-link-type="method" href="#dom-global-valueof"><c- g>valueOf</c-></a>();
<c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a class="idl-code" data-link-type="attribute" data-type="any" href="#dom-global-value"><c- g>value</c-></a>;
};
<c- b>dictionary</c-> <a href="#dictdef-tagtype"><code><c- g>TagType</c-></code></a> {
<c- b>required</c-> <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence"><c- b>sequence</c-></a>&lt;<a data-link-type="idl-name" href="#enumdef-valuetype"><c- n>ValueType</c-></a>> <a data-type="sequence<ValueType>" href="#dom-tagtype-parameters"><code><c- g>parameters</c-></code></a>;
};
[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNamespace"><c- g>LegacyNamespace</c-></a>=<a data-link-type="idl-name" href="#namespacedef-webassembly"><c- n>WebAssembly</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed"><c- g>Exposed</c-></a>=(<c- n>Window</c->,<c- n>Worker</c->,<c- n>Worklet</c->)]
<c- b>interface</c-> <a href="#tag"><code><c- g>Tag</c-></code></a> {
<a class="idl-code" data-link-type="constructor" href="#dom-tag-tag"><c- g>constructor</c-></a>(<a data-link-type="idl-name" href="#dictdef-tagtype"><c- n>TagType</c-></a> <a href="#dom-tag-tag-type-type"><code><c- g>type</c-></code></a>);
<a data-link-type="idl-name" href="#dictdef-tagtype"><c- n>TagType</c-></a> <a class="idl-code" data-link-type="method" href="#dom-tag-type"><c- g>type</c-></a>();
};
<c- b>dictionary</c-> <a href="#dictdef-exceptionoptions"><code><c- g>ExceptionOptions</c-></code></a> {
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean"><c- b>boolean</c-></a> <a data-default="false" data-type="boolean" href="#dom-exceptionoptions-tracestack"><code><c- g>traceStack</c-></code></a> = <c- b>false</c->;
};
[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#LegacyNamespace"><c- g>LegacyNamespace</c-></a>=<a data-link-type="idl-name" href="#namespacedef-webassembly"><c- n>WebAssembly</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed"><c- g>Exposed</c-></a>=(<c- n>Window</c->,<c- n>Worker</c->,<c- n>Worklet</c->)]
<c- b>interface</c-> <a href="#exception"><code><c- g>Exception</c-></code></a> {
<a class="idl-code" data-link-type="constructor" href="#dom-exception-exception"><c- g>constructor</c-></a>(<a data-link-type="idl-name" href="#tag"><c- n>Tag</c-></a> <a href="#dom-exception-exception-exceptiontag-payload-options-exceptiontag"><code><c- g>exceptionTag</c-></code></a>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence"><c- b>sequence</c-></a>&lt;<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a>> <a href="#dom-exception-exception-exceptiontag-payload-options-payload"><code><c- g>payload</c-></code></a>, <c- b>optional</c-> <a data-link-type="idl-name" href="#dictdef-exceptionoptions"><c- n>ExceptionOptions</c-></a> <a href="#dom-exception-exception-exceptiontag-payload-options-options"><code><c- g>options</c-></code></a> = {});
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a class="idl-code" data-link-type="method" href="#dom-exception-getarg"><c- g>getArg</c-></a>(<a data-link-type="idl-name" href="#tag"><c- n>Tag</c-></a> <a href="#dom-exception-getarg-exceptiontag-index-exceptiontag"><code><c- g>exceptionTag</c-></code></a>, [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#EnforceRange"><c- g>EnforceRange</c-></a>] <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long"><c- b>unsigned</c-> <c- b>long</c-></a> <a href="#dom-exception-getarg-exceptiontag-index-index"><code><c- g>index</c-></code></a>);
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean"><c- b>boolean</c-></a> <a class="idl-code" data-link-type="method" href="#dom-exception-is"><c- g>is</c-></a>(<a data-link-type="idl-name" href="#tag"><c- n>Tag</c-></a> <a href="#dom-exception-is-exceptiontag-exceptiontag"><code><c- g>exceptionTag</c-></code></a>);
<c- b>readonly</c-> <c- b>attribute</c-> (<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString"><c- b>DOMString</c-></a> <c- b>or</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-undefined"><c- b>undefined</c-></a>) <a class="idl-code" data-link-type="attribute" data-readonly data-type="(DOMString or undefined)" href="#dom-exception-stack"><c- g>stack</c-></a>;
};
</pre>
<h2 class="no-num no-ref heading settled" id="issues-index"><span class="content">Issues Index</span><a class="self-link" href="#issues-index"></a></h2>
<div style="counter-reset:issue">
<div class="issue">
A failed allocation of a large table or memory may either result in
<ul>
<li data-md>
<p>a <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-rangeerror">RangeError</a></code>, as specified in the <code class="idl"><a data-link-type="idl" href="#memory">Memory</a></code> <code class="idl"><a data-link-type="idl" href="#dom-memory-grow">grow()</a></code> and <code class="idl"><a data-link-type="idl" href="#table">Table</a></code> <code class="idl"><a data-link-type="idl" href="#dom-table-grow">grow()</a></code> operations</p>
<li data-md>
<p>returning -1 as the <a data-link-type="dfn" href="https://webassembly.github.io/exception-handling/core/exec/instructions.html#exec-memory-grow">memory.grow</a> instruction</p>
<li data-md>
<p>UA-specific OOM behavior as described in this section.</p>
</ul>
In a future revision, we may reconsider more reliable and recoverable errors for allocations of large amounts of memory.
<p>See <a href="https://github.com/WebAssembly/spec/issues/879">Issue 879</a> for further discussion.</p>
<a class="issue-return" href="#issue-7eafcf54" title="Jump to section"></a>
</div>
</div>
<script>/* Boilerplate: script-dom-helper */
"use strict";
function query(sel) { return document.querySelector(sel); }
function queryAll(sel) { return [...document.querySelectorAll(sel)]; }
function iter(obj) {
if(!obj) return [];
var it = obj[Symbol.iterator];
if(it) return it;
return Object.entries(obj);
}
function mk(tagname, attrs, ...children) {
const el = document.createElement(tagname);
for(const [k,v] of iter(attrs)) {
if(k.slice(0,3) == "_on") {
const eventName = k.slice(3);
el.addEventListener(eventName, v);
} else if(k[0] == "_") {
// property, not attribute
el[k.slice(1)] = v;
} else {
if(v === false || v == null) {
continue;
} else if(v === true) {
el.setAttribute(k, "");
continue;
} else {
el.setAttribute(k, v);
}
}
}
append(el, children);
return el;
}
/* Create shortcuts for every known HTML element */
[
"a",
"abbr",
"acronym",
"address",
"applet",
"area",
"article",
"aside",
"audio",
"b",
"base",
"basefont",
"bdo",
"big",
"blockquote",
"body",
"br",
"button",
"canvas",
"caption",
"center",
"cite",
"code",
"col",
"colgroup",
"datalist",
"dd",
"del",
"details",
"dfn",
"dialog",
"div",
"dl",
"dt",
"em",
"embed",
"fieldset",
"figcaption",
"figure",
"font",
"footer",
"form",
"frame",
"frameset",
"head",
"header",
"h1",
"h2",
"h3",
"h4",
"h5",
"h6",
"hr",
"html",
"i",
"iframe",
"img",
"input",
"ins",
"kbd",
"label",
"legend",
"li",
"link",
"main",
"map",
"mark",
"meta",
"meter",
"nav",
"nobr",
"noscript",
"object",
"ol",
"optgroup",
"option",
"output",
"p",
"param",
"pre",
"progress",
"q",
"s",
"samp",
"script",
"section",
"select",
"small",
"source",
"span",
"strike",
"strong",
"style",
"sub",
"summary",
"sup",
"table",
"tbody",
"td",
"template",
"textarea",
"tfoot",
"th",
"thead",
"time",
"title",
"tr",
"u",
"ul",
"var",
"video",
"wbr",
"xmp",
].forEach(tagname=>{
mk[tagname] = (...args) => mk(tagname, ...args);
});
function* nodesFromChildList(children) {
for(const child of children.flat(Infinity)) {
if(child instanceof Node) {
yield child;
} else {
yield new Text(child);
}
}
}
function append(el, ...children) {
for(const child of nodesFromChildList(children)) {
if(el instanceof Node) el.appendChild(child);
else el.push(child);
}
return el;
}
function insertAfter(el, ...children) {
for(const child of nodesFromChildList(children)) {
el.parentNode.insertBefore(child, el.nextSibling);
}
return el;
}
function clearContents(el) {
el.innerHTML = "";
return el;
}
function parseHTML(markup) {
if(markup.toLowerCase().trim().indexOf('<!doctype') === 0) {
const doc = document.implementation.createHTMLDocument("");
doc.documentElement.innerHTML = markup;
return doc;
} else {
const el = mk.template({});
el.innerHTML = markup;
return el.content;
}
}</script>
<script>/* Boilerplate: script-dfn-panel */
"use strict";
{
let dfnPanelData = {
"0204d188": {"dfnID":"0204d188","dfnText":"size","external":true,"refSections":[{"refs":[{"id":"ref-for-list-size"},{"id":"ref-for-list-size\u2460"},{"id":"ref-for-list-size\u2461"},{"id":"ref-for-list-size\u2462"},{"id":"ref-for-list-size\u2463"}],"title":"4.6. Exported Functions"},{"refs":[{"id":"ref-for-list-size\u2464"},{"id":"ref-for-list-size\u2465"},{"id":"ref-for-list-size\u2466"},{"id":"ref-for-list-size\u2467"},{"id":"ref-for-list-size\u2468"}],"title":"4.7.2. Runtime exceptions"}],"url":"https://infra.spec.whatwg.org/#list-size"},
"02fa4741": {"dfnID":"02fa4741","dfnText":"memory instance","external":true,"refSections":[{"refs":[{"id":"ref-for-memory-instances"}],"title":"3.1. Interaction of the WebAssembly Store with JavaScript"},{"refs":[{"id":"ref-for-memory-instances\u2460"}],"title":"4.3. Memories"}],"url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#memory-instances"},
"02fc9e53": {"dfnID":"02fc9e53","dfnText":"funcref","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-reftype"}],"title":"4.4. Tables"},{"refs":[{"id":"ref-for-syntax-reftype\u2460"},{"id":"ref-for-syntax-reftype\u2461"},{"id":"ref-for-syntax-reftype\u2462"},{"id":"ref-for-syntax-reftype\u2463"},{"id":"ref-for-syntax-reftype\u2464"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-syntax-reftype\u2465"},{"id":"ref-for-syntax-reftype\u2466"},{"id":"ref-for-syntax-reftype\u2467"},{"id":"ref-for-syntax-reftype\u2468"},{"id":"ref-for-syntax-reftype\u2460\u24ea"},{"id":"ref-for-syntax-reftype\u2460\u2460"}],"title":"4.6. Exported Functions"},{"refs":[{"id":"ref-for-syntax-reftype\u2460\u2461"}],"title":"4.7.3. JavaScript exceptions"}],"url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-reftype"},
"03b42059": {"dfnID":"03b42059","dfnText":"module_exports","external":true,"refSections":[{"refs":[{"id":"ref-for-embed-module-exports"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-embed-module-exports\u2460"}],"title":"4.1. Modules"}],"url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-module-exports"},
"061511d8": {"dfnID":"061511d8","dfnText":"f32.const","external":true,"refSections":[{"refs":[{"id":"ref-for-values"}],"title":"4.3. Memories"},{"refs":[{"id":"ref-for-values\u2460"},{"id":"ref-for-values\u2461"},{"id":"ref-for-values\u2462"},{"id":"ref-for-values\u2463"},{"id":"ref-for-values\u2464"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-values\u2465"},{"id":"ref-for-values\u2466"},{"id":"ref-for-values\u2467"},{"id":"ref-for-values\u2468"},{"id":"ref-for-values\u2460\u24ea"},{"id":"ref-for-values\u2460\u2460"},{"id":"ref-for-values\u2460\u2461"},{"id":"ref-for-values\u2460\u2462"},{"id":"ref-for-values\u2460\u2463"},{"id":"ref-for-values\u2460\u2464"},{"id":"ref-for-values\u2460\u2465"},{"id":"ref-for-values\u2460\u2466"},{"id":"ref-for-values\u2460\u2467"},{"id":"ref-for-values\u2460\u2468"},{"id":"ref-for-values\u2461\u24ea"},{"id":"ref-for-values\u2461\u2460"},{"id":"ref-for-values\u2461\u2461"},{"id":"ref-for-values\u2461\u2462"},{"id":"ref-for-values\u2461\u2463"},{"id":"ref-for-values\u2461\u2464"},{"id":"ref-for-values\u2461\u2465"},{"id":"ref-for-values\u2461\u2466"}],"title":"4.6. Exported Functions"}],"url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#values"},
"06f63be9": {"dfnID":"06f63be9","dfnText":"ToInt32","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-toint32"}],"title":"4.6. Exported Functions"}],"url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-toint32"},
"0e6b2056": {"dfnID":"0e6b2056","dfnText":"set","external":true,"refSections":[{"refs":[{"id":"ref-for-map-set"}],"title":"4.3. Memories"},{"refs":[{"id":"ref-for-map-set\u2460"}],"title":"4.4. Tables"},{"refs":[{"id":"ref-for-map-set\u2461"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-map-set\u2462"},{"id":"ref-for-map-set\u2463"}],"title":"4.6. Exported Functions"},{"refs":[{"id":"ref-for-map-set\u2464"}],"title":"4.7.1. Exception types"}],"url":"https://infra.spec.whatwg.org/#map-set"},
"0f1fd09e": {"dfnID":"0f1fd09e","dfnText":"table_read","external":true,"refSections":[{"refs":[{"id":"ref-for-embed-table-read"}],"title":"4.4. Tables"}],"url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-table-read"},
"105d3812": {"dfnID":"105d3812","dfnText":"canon","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-float"},{"id":"ref-for-syntax-float\u2460"},{"id":"ref-for-syntax-float\u2461"},{"id":"ref-for-syntax-float\u2462"},{"id":"ref-for-syntax-float\u2463"},{"id":"ref-for-syntax-float\u2464"},{"id":"ref-for-syntax-float\u2465"},{"id":"ref-for-syntax-float\u2466"},{"id":"ref-for-syntax-float\u2467"},{"id":"ref-for-syntax-float\u2468"},{"id":"ref-for-syntax-float\u2460\u24ea"},{"id":"ref-for-syntax-float\u2460\u2460"}],"title":"4.6. Exported Functions"}],"url":"https://webassembly.github.io/exception-handling/core/syntax/values.html#syntax-float"},
"1188c903": {"dfnID":"1188c903","dfnText":"module_imports","external":true,"refSections":[{"refs":[{"id":"ref-for-embed-module-imports"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-embed-module-imports\u2460"}],"title":"4.1. Modules"}],"url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-module-imports"},
"1243a891": {"dfnID":"1243a891","dfnText":"exist","external":true,"refSections":[{"refs":[{"id":"ref-for-map-exists"},{"id":"ref-for-map-exists\u2460"},{"id":"ref-for-map-exists\u2461"},{"id":"ref-for-map-exists\u2462"}],"title":"4.3. Memories"},{"refs":[{"id":"ref-for-map-exists\u2463"},{"id":"ref-for-map-exists\u2464"},{"id":"ref-for-map-exists\u2465"}],"title":"4.4. Tables"},{"refs":[{"id":"ref-for-map-exists\u2466"},{"id":"ref-for-map-exists\u2467"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-map-exists\u2468"},{"id":"ref-for-map-exists\u2460\u24ea"},{"id":"ref-for-map-exists\u2460\u2460"}],"title":"4.6. Exported Functions"},{"refs":[{"id":"ref-for-map-exists\u2460\u2461"},{"id":"ref-for-map-exists\u2460\u2462"}],"title":"4.7.1. Exception types"}],"url":"https://infra.spec.whatwg.org/#map-exists"},
"16243635": {"dfnID":"16243635","dfnText":"i64.const","external":true,"refSections":[{"refs":[{"id":"ref-for-values"}],"title":"4.3. Memories"},{"refs":[{"id":"ref-for-values\u2460"},{"id":"ref-for-values\u2461"},{"id":"ref-for-values\u2462"},{"id":"ref-for-values\u2463"},{"id":"ref-for-values\u2464"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-values\u2465"},{"id":"ref-for-values\u2466"},{"id":"ref-for-values\u2467"},{"id":"ref-for-values\u2468"},{"id":"ref-for-values\u2460\u24ea"},{"id":"ref-for-values\u2460\u2460"},{"id":"ref-for-values\u2460\u2461"},{"id":"ref-for-values\u2460\u2462"},{"id":"ref-for-values\u2460\u2463"},{"id":"ref-for-values\u2460\u2464"},{"id":"ref-for-values\u2460\u2465"},{"id":"ref-for-values\u2460\u2466"},{"id":"ref-for-values\u2460\u2467"},{"id":"ref-for-values\u2460\u2468"},{"id":"ref-for-values\u2461\u24ea"},{"id":"ref-for-values\u2461\u2460"},{"id":"ref-for-values\u2461\u2461"},{"id":"ref-for-values\u2461\u2462"},{"id":"ref-for-values\u2461\u2463"},{"id":"ref-for-values\u2461\u2464"},{"id":"ref-for-values\u2461\u2465"},{"id":"ref-for-values\u2461\u2466"}],"title":"4.6. Exported Functions"}],"url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#values"},
"17ff3dca": {"dfnID":"17ff3dca","dfnText":"f32","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-numtype"},{"id":"ref-for-syntax-numtype\u2460"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-syntax-numtype\u2461"},{"id":"ref-for-syntax-numtype\u2462"},{"id":"ref-for-syntax-numtype\u2463"},{"id":"ref-for-syntax-numtype\u2464"},{"id":"ref-for-syntax-numtype\u2465"},{"id":"ref-for-syntax-numtype\u2466"},{"id":"ref-for-syntax-numtype\u2467"},{"id":"ref-for-syntax-numtype\u2468"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-syntax-numtype\u2460\u24ea"},{"id":"ref-for-syntax-numtype\u2460\u2460"},{"id":"ref-for-syntax-numtype\u2460\u2461"},{"id":"ref-for-syntax-numtype\u2460\u2462"}],"title":"4.6. Exported Functions"}],"url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-numtype"},
"1918480b": {"dfnID":"1918480b","dfnText":"i32","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-numtype"},{"id":"ref-for-syntax-numtype\u2460"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-syntax-numtype\u2461"},{"id":"ref-for-syntax-numtype\u2462"},{"id":"ref-for-syntax-numtype\u2463"},{"id":"ref-for-syntax-numtype\u2464"},{"id":"ref-for-syntax-numtype\u2465"},{"id":"ref-for-syntax-numtype\u2466"},{"id":"ref-for-syntax-numtype\u2467"},{"id":"ref-for-syntax-numtype\u2468"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-syntax-numtype\u2460\u24ea"},{"id":"ref-for-syntax-numtype\u2460\u2460"},{"id":"ref-for-syntax-numtype\u2460\u2461"},{"id":"ref-for-syntax-numtype\u2460\u2462"}],"title":"4.6. Exported Functions"}],"url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-numtype"},
"19b5bb37": {"dfnID":"19b5bb37","dfnText":"table_size","external":true,"refSections":[{"refs":[{"id":"ref-for-embed-table-size"},{"id":"ref-for-embed-table-size\u2460"}],"title":"4.4. Tables"}],"url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-table-size"},
"222193f2": {"dfnID":"222193f2","dfnText":"table type","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-tabletype"},{"id":"ref-for-syntax-tabletype\u2460"},{"id":"ref-for-syntax-tabletype\u2461"}],"title":"4.4. Tables"}],"url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-tabletype"},
"230965d3": {"dfnID":"230965d3","dfnText":"mem","external":true,"refSections":[{"refs":[{"id":"ref-for-external-types"},{"id":"ref-for-external-types\u2460"},{"id":"ref-for-external-types\u2461"},{"id":"ref-for-external-types\u2462"},{"id":"ref-for-external-types\u2463"},{"id":"ref-for-external-types\u2464"},{"id":"ref-for-external-types\u2465"},{"id":"ref-for-external-types\u2466"},{"id":"ref-for-external-types\u2467"},{"id":"ref-for-external-types\u2468"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-external-types\u2460\u24ea"},{"id":"ref-for-external-types\u2460\u2460"},{"id":"ref-for-external-types\u2460\u2461"},{"id":"ref-for-external-types\u2460\u2462"},{"id":"ref-for-external-types\u2460\u2463"}],"title":"4.1. Modules"}],"url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#external-types"},
"23ad85cd": {"dfnID":"23ad85cd","dfnText":"address","external":true,"refSections":[{"refs":[{"id":"ref-for-addresses"}],"title":"3.2. WebAssembly JS Object Caches"}],"url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#addresses"},
"24bd7d25": {"dfnID":"24bd7d25","dfnText":"upon fulfillment","external":true,"refSections":[{"refs":[{"id":"ref-for-upon-fulfillment"},{"id":"ref-for-upon-fulfillment\u2460"}],"title":"4. The WebAssembly Namespace"}],"url":"https://webidl.spec.whatwg.org/#upon-fulfillment"},
"24ed9d2a": {"dfnID":"24ed9d2a","dfnText":"f64","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-numtype"},{"id":"ref-for-syntax-numtype\u2460"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-syntax-numtype\u2461"},{"id":"ref-for-syntax-numtype\u2462"},{"id":"ref-for-syntax-numtype\u2463"},{"id":"ref-for-syntax-numtype\u2464"},{"id":"ref-for-syntax-numtype\u2465"},{"id":"ref-for-syntax-numtype\u2466"},{"id":"ref-for-syntax-numtype\u2467"},{"id":"ref-for-syntax-numtype\u2468"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-syntax-numtype\u2460\u24ea"},{"id":"ref-for-syntax-numtype\u2460\u2460"},{"id":"ref-for-syntax-numtype\u2460\u2461"},{"id":"ref-for-syntax-numtype\u2460\u2462"}],"title":"4.6. Exported Functions"}],"url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-numtype"},
"255472e5": {"dfnID":"255472e5","dfnText":"module","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-module"},{"id":"ref-for-syntax-module\u2460"}],"title":"4. The WebAssembly Namespace"}],"url":"https://webassembly.github.io/exception-handling/core/syntax/modules.html#syntax-module"},
"26c6c228": {"dfnID":"26c6c228","dfnText":"mem_alloc","external":true,"refSections":[{"refs":[{"id":"ref-for-embed-mem-alloc"}],"title":"4.3. Memories"}],"url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-mem-alloc"},
"3134c785": {"dfnID":"3134c785","dfnText":"agent","external":true,"refSections":[{"refs":[{"id":"ref-for-realm's-agent"}],"title":"3.1. Interaction of the WebAssembly Store with JavaScript"},{"refs":[{"id":"ref-for-realm's-agent\u2460"},{"id":"ref-for-realm's-agent\u2461"}],"title":"3.2. WebAssembly JS Object Caches"},{"refs":[{"id":"ref-for-realm's-agent\u2462"}],"title":"4.5. Globals"}],"url":"https://html.spec.whatwg.org/multipage/webappapis.html#realm's-agent"},
"366977dd": {"dfnID":"366977dd","dfnText":"store_init","external":true,"refSections":[{"refs":[{"id":"ref-for-embed-store-init"}],"title":"3.1. Interaction of the WebAssembly Store with JavaScript"}],"url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-store-init"},
"369594bc": {"dfnID":"369594bc","dfnText":"SetIntegrityLevel","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-setintegritylevel"}],"title":"4. The WebAssembly Namespace"}],"url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-setintegritylevel"},
"3718136b": {"dfnID":"3718136b","dfnText":"imports","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-module"},{"id":"ref-for-syntax-module\u2460"}],"title":"4. The WebAssembly Namespace"}],"url":"https://webassembly.github.io/exception-handling/core/syntax/modules.html#syntax-module"},
"3854fb40": {"dfnID":"3854fb40","dfnText":"custom section","external":true,"refSections":[{"refs":[{"id":"ref-for-custom-section"}],"title":"4.1. Modules"}],"url":"https://webassembly.github.io/exception-handling/core/binary/modules.html#custom-section"},
"3aff2fb3": {"dfnID":"3aff2fb3","dfnText":"BufferSource","external":true,"refSections":[{"refs":[{"id":"ref-for-BufferSource"},{"id":"ref-for-BufferSource\u2460"},{"id":"ref-for-BufferSource\u2461"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-BufferSource\u2462"}],"title":"4.1. Modules"}],"url":"https://webidl.spec.whatwg.org/#BufferSource"},
"3b0b30b1": {"dfnID":"3b0b30b1","dfnText":"externref","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-reftype"}],"title":"4.4. Tables"},{"refs":[{"id":"ref-for-syntax-reftype\u2460"},{"id":"ref-for-syntax-reftype\u2461"},{"id":"ref-for-syntax-reftype\u2462"},{"id":"ref-for-syntax-reftype\u2463"},{"id":"ref-for-syntax-reftype\u2464"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-syntax-reftype\u2465"},{"id":"ref-for-syntax-reftype\u2466"},{"id":"ref-for-syntax-reftype\u2467"},{"id":"ref-for-syntax-reftype\u2468"},{"id":"ref-for-syntax-reftype\u2460\u24ea"},{"id":"ref-for-syntax-reftype\u2460\u2460"}],"title":"4.6. Exported Functions"},{"refs":[{"id":"ref-for-syntax-reftype\u2460\u2461"}],"title":"4.7.3. JavaScript exceptions"}],"url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-reftype"},
"3b90bdcd": {"dfnID":"3b90bdcd","dfnText":"resolve","external":true,"refSections":[{"refs":[{"id":"ref-for-resolve"},{"id":"ref-for-resolve\u2460"},{"id":"ref-for-resolve\u2461"}],"title":"4. The WebAssembly Namespace"}],"url":"https://webidl.spec.whatwg.org/#resolve"},
"3e180d35": {"dfnID":"3e180d35","dfnText":"associated realm","external":true,"refSections":[{"refs":[{"id":"ref-for-dfn-associated-realm"}],"title":"4.6. Exported Functions"}],"url":"https://webidl.spec.whatwg.org/#dfn-associated-realm"},
"3e98617e": {"dfnID":"3e98617e","dfnText":"func_type","external":true,"refSections":[{"refs":[{"id":"ref-for-embed-func-type"},{"id":"ref-for-embed-func-type\u2460"}],"title":"4.6. Exported Functions"}],"url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-func-type"},
"40217ce1": {"dfnID":"40217ce1","dfnText":"table address","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-tableaddr"}],"title":"3.2. WebAssembly JS Object Caches"},{"refs":[{"id":"ref-for-syntax-tableaddr\u2460"},{"id":"ref-for-syntax-tableaddr\u2461"},{"id":"ref-for-syntax-tableaddr\u2462"}],"title":"4.4. Tables"}],"url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-tableaddr"},
"41a5a9e9": {"dfnID":"41a5a9e9","dfnText":"var","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-mut"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-syntax-mut\u2460"},{"id":"ref-for-syntax-mut\u2461"},{"id":"ref-for-syntax-mut\u2462"}],"title":"4.5. Globals"}],"url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-mut"},
"42d05323": {"dfnID":"42d05323","dfnText":"WebAssembly value","external":true,"refSections":[{"refs":[{"id":"ref-for-values"}],"title":"4.3. Memories"},{"refs":[{"id":"ref-for-values\u2460"},{"id":"ref-for-values\u2461"},{"id":"ref-for-values\u2462"},{"id":"ref-for-values\u2463"},{"id":"ref-for-values\u2464"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-values\u2465"},{"id":"ref-for-values\u2466"},{"id":"ref-for-values\u2467"},{"id":"ref-for-values\u2468"},{"id":"ref-for-values\u2460\u24ea"},{"id":"ref-for-values\u2460\u2460"},{"id":"ref-for-values\u2460\u2461"},{"id":"ref-for-values\u2460\u2462"},{"id":"ref-for-values\u2460\u2463"},{"id":"ref-for-values\u2460\u2464"},{"id":"ref-for-values\u2460\u2465"},{"id":"ref-for-values\u2460\u2466"},{"id":"ref-for-values\u2460\u2467"},{"id":"ref-for-values\u2460\u2468"},{"id":"ref-for-values\u2461\u24ea"},{"id":"ref-for-values\u2461\u2460"},{"id":"ref-for-values\u2461\u2461"},{"id":"ref-for-values\u2461\u2462"},{"id":"ref-for-values\u2461\u2463"},{"id":"ref-for-values\u2461\u2464"},{"id":"ref-for-values\u2461\u2465"},{"id":"ref-for-values\u2461\u2466"}],"title":"4.6. Exported Functions"}],"url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#values"},
"43564950": {"dfnID":"43564950","dfnText":"RangeError","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-native-error-types-used-in-this-standard-rangeerror"},{"id":"ref-for-sec-native-error-types-used-in-this-standard-rangeerror\u2460"},{"id":"ref-for-sec-native-error-types-used-in-this-standard-rangeerror\u2461"}],"title":"4.3. Memories"},{"refs":[{"id":"ref-for-sec-native-error-types-used-in-this-standard-rangeerror\u2462"},{"id":"ref-for-sec-native-error-types-used-in-this-standard-rangeerror\u2463"},{"id":"ref-for-sec-native-error-types-used-in-this-standard-rangeerror\u2464"},{"id":"ref-for-sec-native-error-types-used-in-this-standard-rangeerror\u2465"}],"title":"4.4. Tables"},{"refs":[{"id":"ref-for-sec-native-error-types-used-in-this-standard-rangeerror\u2466"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-sec-native-error-types-used-in-this-standard-rangeerror\u2467"}],"title":"4.7.2. Runtime exceptions"},{"refs":[{"id":"ref-for-sec-native-error-types-used-in-this-standard-rangeerror\u2468"}],"title":"4.8. Error Objects"},{"refs":[{"id":"ref-for-sec-native-error-types-used-in-this-standard-rangeerror\u2460\u24ea"}],"title":"5.1. Stack Overflow"},{"refs":[{"id":"ref-for-sec-native-error-types-used-in-this-standard-rangeerror\u2460\u2460"}],"title":"5.2. Out of Memory"}],"url":"https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-rangeerror"},
"44f9892e": {"dfnID":"44f9892e","dfnText":"const","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-mut"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-syntax-mut\u2460"},{"id":"ref-for-syntax-mut\u2461"},{"id":"ref-for-syntax-mut\u2462"}],"title":"4.5. Globals"}],"url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-mut"},
"4529c626": {"dfnID":"4529c626","dfnText":"table_write","external":true,"refSections":[{"refs":[{"id":"ref-for-embed-table-write"}],"title":"4.4. Tables"}],"url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-table-write"},
"45d8d6e9": {"dfnID":"45d8d6e9","dfnText":"module_instantiate","external":true,"refSections":[{"refs":[{"id":"ref-for-embed-module-instantiate"}],"title":"4. The WebAssembly Namespace"}],"url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-module-instantiate"},
"49619d48": {"dfnID":"49619d48","dfnText":"f64.const","external":true,"refSections":[{"refs":[{"id":"ref-for-values"}],"title":"4.3. Memories"},{"refs":[{"id":"ref-for-values\u2460"},{"id":"ref-for-values\u2461"},{"id":"ref-for-values\u2462"},{"id":"ref-for-values\u2463"},{"id":"ref-for-values\u2464"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-values\u2465"},{"id":"ref-for-values\u2466"},{"id":"ref-for-values\u2467"},{"id":"ref-for-values\u2468"},{"id":"ref-for-values\u2460\u24ea"},{"id":"ref-for-values\u2460\u2460"},{"id":"ref-for-values\u2460\u2461"},{"id":"ref-for-values\u2460\u2462"},{"id":"ref-for-values\u2460\u2463"},{"id":"ref-for-values\u2460\u2464"},{"id":"ref-for-values\u2460\u2465"},{"id":"ref-for-values\u2460\u2466"},{"id":"ref-for-values\u2460\u2467"},{"id":"ref-for-values\u2460\u2468"},{"id":"ref-for-values\u2461\u24ea"},{"id":"ref-for-values\u2461\u2460"},{"id":"ref-for-values\u2461\u2461"},{"id":"ref-for-values\u2461\u2462"},{"id":"ref-for-values\u2461\u2463"},{"id":"ref-for-values\u2461\u2464"},{"id":"ref-for-values\u2461\u2465"},{"id":"ref-for-values\u2461\u2466"}],"title":"4.6. Exported Functions"}],"url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#values"},
"4a854a91": {"dfnID":"4a854a91","dfnText":"ToString","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-tostring"}],"title":"4.6. Exported Functions"}],"url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-tostring"},
"4ad913ae": {"dfnID":"4ad913ae","dfnText":"surrounding agent","external":true,"refSections":[{"refs":[{"id":"ref-for-surrounding-agent"},{"id":"ref-for-surrounding-agent\u2460"},{"id":"ref-for-surrounding-agent\u2461"},{"id":"ref-for-surrounding-agent\u2462"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-surrounding-agent\u2463"},{"id":"ref-for-surrounding-agent\u2464"},{"id":"ref-for-surrounding-agent\u2465"},{"id":"ref-for-surrounding-agent\u2466"},{"id":"ref-for-surrounding-agent\u2467"},{"id":"ref-for-surrounding-agent\u2468"},{"id":"ref-for-surrounding-agent\u2460\u24ea"}],"title":"4.3. Memories"},{"refs":[{"id":"ref-for-surrounding-agent\u2460\u2460"},{"id":"ref-for-surrounding-agent\u2460\u2461"},{"id":"ref-for-surrounding-agent\u2460\u2462"},{"id":"ref-for-surrounding-agent\u2460\u2463"},{"id":"ref-for-surrounding-agent\u2460\u2464"},{"id":"ref-for-surrounding-agent\u2460\u2465"},{"id":"ref-for-surrounding-agent\u2460\u2466"},{"id":"ref-for-surrounding-agent\u2460\u2467"},{"id":"ref-for-surrounding-agent\u2460\u2468"},{"id":"ref-for-surrounding-agent\u2461\u24ea"}],"title":"4.4. Tables"},{"refs":[{"id":"ref-for-surrounding-agent\u2461\u2460"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-surrounding-agent\u2461\u2461"},{"id":"ref-for-surrounding-agent\u2461\u2462"},{"id":"ref-for-surrounding-agent\u2461\u2463"},{"id":"ref-for-surrounding-agent\u2461\u2464"},{"id":"ref-for-surrounding-agent\u2461\u2465"},{"id":"ref-for-surrounding-agent\u2461\u2466"},{"id":"ref-for-surrounding-agent\u2461\u2467"},{"id":"ref-for-surrounding-agent\u2461\u2468"},{"id":"ref-for-surrounding-agent\u2462\u24ea"},{"id":"ref-for-surrounding-agent\u2462\u2460"}],"title":"4.6. Exported Functions"},{"refs":[{"id":"ref-for-surrounding-agent\u2462\u2461"},{"id":"ref-for-surrounding-agent\u2462\u2462"},{"id":"ref-for-surrounding-agent\u2462\u2463"}],"title":"4.7.1. Exception types"},{"refs":[{"id":"ref-for-surrounding-agent\u2462\u2464"},{"id":"ref-for-surrounding-agent\u2462\u2465"}],"title":"4.7.2. Runtime exceptions"}],"url":"https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent"},
"4c6c6f05": {"dfnID":"4c6c6f05","dfnText":"CreateArrayFromList","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-createarrayfromlist"}],"title":"4.6. Exported Functions"}],"url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-createarrayfromlist"},
"4db6e00c": {"dfnID":"4db6e00c","dfnText":"module grammar","external":true,"refSections":[{"refs":[{"id":"ref-for-binary-module"}],"title":"4.1. Modules"}],"url":"https://webassembly.github.io/exception-handling/core/binary/modules.html#binary-module"},
"4e1a8ff3": {"dfnID":"4e1a8ff3","dfnText":"v128","external":true,"refSections":[{"refs":[{"id":"ref-for-vector-types"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-vector-types\u2460"},{"id":"ref-for-vector-types\u2461"},{"id":"ref-for-vector-types\u2462"},{"id":"ref-for-vector-types\u2463"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-vector-types\u2464"},{"id":"ref-for-vector-types\u2465"},{"id":"ref-for-vector-types\u2466"}],"title":"4.6. Exported Functions"}],"url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#vector-types"},
"4f0eba03": {"dfnID":"4f0eba03","dfnText":"ref.func","external":true,"refSections":[{"refs":[{"id":"ref-for-values"}],"title":"4.3. Memories"},{"refs":[{"id":"ref-for-values\u2460"},{"id":"ref-for-values\u2461"},{"id":"ref-for-values\u2462"},{"id":"ref-for-values\u2463"},{"id":"ref-for-values\u2464"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-values\u2465"},{"id":"ref-for-values\u2466"},{"id":"ref-for-values\u2467"},{"id":"ref-for-values\u2468"},{"id":"ref-for-values\u2460\u24ea"},{"id":"ref-for-values\u2460\u2460"},{"id":"ref-for-values\u2460\u2461"},{"id":"ref-for-values\u2460\u2462"},{"id":"ref-for-values\u2460\u2463"},{"id":"ref-for-values\u2460\u2464"},{"id":"ref-for-values\u2460\u2465"},{"id":"ref-for-values\u2460\u2466"},{"id":"ref-for-values\u2460\u2467"},{"id":"ref-for-values\u2460\u2468"},{"id":"ref-for-values\u2461\u24ea"},{"id":"ref-for-values\u2461\u2460"},{"id":"ref-for-values\u2461\u2461"},{"id":"ref-for-values\u2461\u2462"},{"id":"ref-for-values\u2461\u2463"},{"id":"ref-for-values\u2461\u2464"},{"id":"ref-for-values\u2461\u2465"},{"id":"ref-for-values\u2461\u2466"}],"title":"4.6. Exported Functions"}],"url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#values"},
"4f6ab535": {"dfnID":"4f6ab535","dfnText":"FromValueType","external":true,"refSections":[{"refs":[{"id":"ref-for-abstract-opdef-fromvaluetype"}],"title":"4.7.1. Exception types"}],"url":"https://webassembly.github.io/js-types/js-api/#abstract-opdef-fromvaluetype"},
"51ef9bb0": {"dfnID":"51ef9bb0","dfnText":"global address","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-globaladdr"}],"title":"3.2. WebAssembly JS Object Caches"},{"refs":[{"id":"ref-for-syntax-globaladdr\u2460"},{"id":"ref-for-syntax-globaladdr\u2461"},{"id":"ref-for-syntax-globaladdr\u2462"}],"title":"4.5. Globals"}],"url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-globaladdr"},
"53275e46": {"dfnID":"53275e46","dfnText":"append","external":true,"refSections":[{"refs":[{"id":"ref-for-list-append"},{"id":"ref-for-list-append\u2460"},{"id":"ref-for-list-append\u2461"},{"id":"ref-for-list-append\u2462"},{"id":"ref-for-list-append\u2463"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-list-append\u2464"},{"id":"ref-for-list-append\u2465"},{"id":"ref-for-list-append\u2466"}],"title":"4.1. Modules"},{"refs":[{"id":"ref-for-list-append\u2467"},{"id":"ref-for-list-append\u2468"},{"id":"ref-for-list-append\u2460\u24ea"},{"id":"ref-for-list-append\u2460\u2460"}],"title":"4.6. Exported Functions"},{"refs":[{"id":"ref-for-list-append\u2460\u2461"},{"id":"ref-for-list-append\u2460\u2462"}],"title":"4.7.1. Exception types"},{"refs":[{"id":"ref-for-list-append\u2460\u2463"}],"title":"4.7.2. Runtime exceptions"}],"url":"https://infra.spec.whatwg.org/#list-append"},
"5372cca8": {"dfnID":"5372cca8","dfnText":"boolean","external":true,"refSections":[{"refs":[{"id":"ref-for-idl-boolean"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-idl-boolean\u2460"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-idl-boolean\u2461"},{"id":"ref-for-idl-boolean\u2462"}],"title":"4.7.2. Runtime exceptions"}],"url":"https://webidl.spec.whatwg.org/#idl-boolean"},
"56f81a8e": {"dfnID":"56f81a8e","dfnText":"new","external":true,"refSections":[{"refs":[{"id":"ref-for-new"},{"id":"ref-for-new\u2460"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-new\u2461"}],"title":"4.3. Memories"},{"refs":[{"id":"ref-for-new\u2462"}],"title":"4.4. Tables"},{"refs":[{"id":"ref-for-new\u2463"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-new\u2464"}],"title":"4.7.1. Exception types"},{"refs":[{"id":"ref-for-new\u2465"}],"title":"4.7.2. Runtime exceptions"}],"url":"https://webidl.spec.whatwg.org/#new"},
"58788f9d": {"dfnID":"58788f9d","dfnText":"TypeError","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-native-error-types-used-in-this-standard-typeerror"},{"id":"ref-for-sec-native-error-types-used-in-this-standard-typeerror\u2460"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-sec-native-error-types-used-in-this-standard-typeerror\u2461"}],"title":"4.4. Tables"},{"refs":[{"id":"ref-for-sec-native-error-types-used-in-this-standard-typeerror\u2462"},{"id":"ref-for-sec-native-error-types-used-in-this-standard-typeerror\u2463"},{"id":"ref-for-sec-native-error-types-used-in-this-standard-typeerror\u2464"},{"id":"ref-for-sec-native-error-types-used-in-this-standard-typeerror\u2465"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-sec-native-error-types-used-in-this-standard-typeerror\u2466"},{"id":"ref-for-sec-native-error-types-used-in-this-standard-typeerror\u2467"},{"id":"ref-for-sec-native-error-types-used-in-this-standard-typeerror\u2468"},{"id":"ref-for-sec-native-error-types-used-in-this-standard-typeerror\u2460\u24ea"},{"id":"ref-for-sec-native-error-types-used-in-this-standard-typeerror\u2460\u2460"}],"title":"4.6. Exported Functions"},{"refs":[{"id":"ref-for-sec-native-error-types-used-in-this-standard-typeerror\u2460\u2461"},{"id":"ref-for-sec-native-error-types-used-in-this-standard-typeerror\u2460\u2462"}],"title":"4.7.2. Runtime exceptions"},{"refs":[{"id":"ref-for-sec-native-error-types-used-in-this-standard-typeerror\u2460\u2463"}],"title":"4.8. Error Objects"}],"url":"https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-typeerror"},
"5b5b2d29": {"dfnID":"5b5b2d29","dfnText":"import","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-import"}],"title":"7. Security and Privacy Considerations"}],"url":"https://webassembly.github.io/exception-handling/core/syntax/modules.html#syntax-import"},
"5b7339ce": {"dfnID":"5b7339ce","dfnText":"GetMethod","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-getmethod"}],"title":"4.6. Exported Functions"}],"url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-getmethod"},
"5c12909f": {"dfnID":"5c12909f","dfnText":"+\u221e","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-float"},{"id":"ref-for-syntax-float\u2460"},{"id":"ref-for-syntax-float\u2461"},{"id":"ref-for-syntax-float\u2462"},{"id":"ref-for-syntax-float\u2463"},{"id":"ref-for-syntax-float\u2464"},{"id":"ref-for-syntax-float\u2465"},{"id":"ref-for-syntax-float\u2466"},{"id":"ref-for-syntax-float\u2467"},{"id":"ref-for-syntax-float\u2468"},{"id":"ref-for-syntax-float\u2460\u24ea"},{"id":"ref-for-syntax-float\u2460\u2460"}],"title":"4.6. Exported Functions"}],"url":"https://webassembly.github.io/exception-handling/core/syntax/values.html#syntax-float"},
"5c956d15": {"dfnID":"5c956d15","dfnText":"module (for frame)","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-frame"},{"id":"ref-for-syntax-frame\u2460"}],"title":"4.3. Memories"}],"url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-frame"},
"5f90bbfb": {"dfnID":"5f90bbfb","dfnText":"undefined","external":true,"refSections":[{"refs":[{"id":"ref-for-idl-undefined"}],"title":"4.4. Tables"},{"refs":[{"id":"ref-for-idl-undefined\u2460"}],"title":"4.7.2. Runtime exceptions"}],"url":"https://webidl.spec.whatwg.org/#idl-undefined"},
"60e61e1a": {"dfnID":"60e61e1a","dfnText":"namespace object","external":true,"refSections":[{"refs":[{"id":"ref-for-dfn-namespace-object"},{"id":"ref-for-dfn-namespace-object\u2460"}],"title":"4.8. Error Objects"}],"url":"https://webidl.spec.whatwg.org/#dfn-namespace-object"},
"649608b9": {"dfnID":"649608b9","dfnText":"list","external":true,"refSections":[{"refs":[{"id":"ref-for-list"}],"title":"2. Notation"},{"refs":[{"id":"ref-for-list\u2460"},{"id":"ref-for-list\u2461"},{"id":"ref-for-list\u2462"}],"title":"4.6. Exported Functions"},{"refs":[{"id":"ref-for-list\u2463"}],"title":"4.7. Tags"},{"refs":[{"id":"ref-for-list\u2464"}],"title":"4.7.2. Runtime exceptions"},{"refs":[{"id":"ref-for-list\u2465"}],"title":"4.7.3. JavaScript exceptions"}],"url":"https://infra.spec.whatwg.org/#list"},
"660d1674": {"dfnID":"660d1674","dfnText":"table_type","external":true,"refSections":[{"refs":[{"id":"ref-for-embed-table-type"},{"id":"ref-for-embed-table-type\u2460"}],"title":"4.4. Tables"}],"url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-table-type"},
"69e1103d": {"dfnID":"69e1103d","dfnText":"i64","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-numtype"},{"id":"ref-for-syntax-numtype\u2460"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-syntax-numtype\u2461"},{"id":"ref-for-syntax-numtype\u2462"},{"id":"ref-for-syntax-numtype\u2463"},{"id":"ref-for-syntax-numtype\u2464"},{"id":"ref-for-syntax-numtype\u2465"},{"id":"ref-for-syntax-numtype\u2466"},{"id":"ref-for-syntax-numtype\u2467"},{"id":"ref-for-syntax-numtype\u2468"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-syntax-numtype\u2460\u24ea"},{"id":"ref-for-syntax-numtype\u2460\u2460"},{"id":"ref-for-syntax-numtype\u2460\u2461"},{"id":"ref-for-syntax-numtype\u2460\u2462"}],"title":"4.6. Exported Functions"}],"url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-numtype"},
"6aa6ca82": {"dfnID":"6aa6ca82","dfnText":"tag (for external value)","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-externval"},{"id":"ref-for-syntax-externval\u2460"},{"id":"ref-for-syntax-externval\u2461"},{"id":"ref-for-syntax-externval\u2462"},{"id":"ref-for-syntax-externval\u2463"},{"id":"ref-for-syntax-externval\u2464"},{"id":"ref-for-syntax-externval\u2465"},{"id":"ref-for-syntax-externval\u2466"},{"id":"ref-for-syntax-externval\u2467"},{"id":"ref-for-syntax-externval\u2468"},{"id":"ref-for-syntax-externval\u2460\u24ea"},{"id":"ref-for-syntax-externval\u2460\u2460"},{"id":"ref-for-syntax-externval\u2460\u2461"},{"id":"ref-for-syntax-externval\u2460\u2462"},{"id":"ref-for-syntax-externval\u2460\u2463"},{"id":"ref-for-syntax-externval\u2460\u2464"},{"id":"ref-for-syntax-externval\u2460\u2465"},{"id":"ref-for-syntax-externval\u2460\u2466"},{"id":"ref-for-syntax-externval\u2460\u2467"}],"title":"4. The WebAssembly Namespace"}],"url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externval"},
"6b815fdd": {"dfnID":"6b815fdd","dfnText":"is empty","external":true,"refSections":[{"refs":[{"id":"ref-for-list-is-empty"}],"title":"4. The WebAssembly Namespace"}],"url":"https://infra.spec.whatwg.org/#list-is-empty"},
"6c06c4bd": {"dfnID":"6c06c4bd","dfnText":"mem_size","external":true,"refSections":[{"refs":[{"id":"ref-for-embed-mem-size"}],"title":"4.3. Memories"}],"url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-mem-size"},
"6c6b1005": {"dfnID":"6c6b1005","dfnText":"any","external":true,"refSections":[{"refs":[{"id":"ref-for-idl-any"},{"id":"ref-for-idl-any\u2460"},{"id":"ref-for-idl-any\u2461"},{"id":"ref-for-idl-any\u2462"}],"title":"4.4. Tables"},{"refs":[{"id":"ref-for-idl-any\u2463"},{"id":"ref-for-idl-any\u2464"},{"id":"ref-for-idl-any\u2465"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-idl-any\u2466"},{"id":"ref-for-idl-any\u2467"}],"title":"4.7.2. Runtime exceptions"}],"url":"https://webidl.spec.whatwg.org/#idl-any"},
"6cb38c36": {"dfnID":"6cb38c36","dfnText":"global_alloc","external":true,"refSections":[{"refs":[{"id":"ref-for-embed-global-alloc"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-embed-global-alloc\u2460"}],"title":"4.5. Globals"}],"url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-global-alloc"},
"6df10f44": {"dfnID":"6df10f44","dfnText":"CreateBuiltinFunction","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-createbuiltinfunction"}],"title":"4.6. Exported Functions"}],"url":"https://tc39.es/ecma262/multipage/ordinary-and-exotic-objects-behaviours.html#sec-createbuiltinfunction"},
"6e99dd75": {"dfnID":"6e99dd75","dfnText":"WebAssembly module validation","external":true,"refSections":[{"refs":[{"id":"ref-for-valid-module"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-valid-module\u2460"}],"title":"4.1. Modules"}],"url":"https://webassembly.github.io/exception-handling/core/valid/modules.html#valid-module"},
"6ef486fb": {"dfnID":"6ef486fb","dfnText":"ref.null","external":true,"refSections":[{"refs":[{"id":"ref-for-values"}],"title":"4.3. Memories"},{"refs":[{"id":"ref-for-values\u2460"},{"id":"ref-for-values\u2461"},{"id":"ref-for-values\u2462"},{"id":"ref-for-values\u2463"},{"id":"ref-for-values\u2464"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-values\u2465"},{"id":"ref-for-values\u2466"},{"id":"ref-for-values\u2467"},{"id":"ref-for-values\u2468"},{"id":"ref-for-values\u2460\u24ea"},{"id":"ref-for-values\u2460\u2460"},{"id":"ref-for-values\u2460\u2461"},{"id":"ref-for-values\u2460\u2462"},{"id":"ref-for-values\u2460\u2463"},{"id":"ref-for-values\u2460\u2464"},{"id":"ref-for-values\u2460\u2465"},{"id":"ref-for-values\u2460\u2466"},{"id":"ref-for-values\u2460\u2467"},{"id":"ref-for-values\u2460\u2468"},{"id":"ref-for-values\u2461\u24ea"},{"id":"ref-for-values\u2461\u2460"},{"id":"ref-for-values\u2461\u2461"},{"id":"ref-for-values\u2461\u2462"},{"id":"ref-for-values\u2461\u2463"},{"id":"ref-for-values\u2461\u2464"},{"id":"ref-for-values\u2461\u2465"},{"id":"ref-for-values\u2461\u2466"}],"title":"4.6. Exported Functions"}],"url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#values"},
"6feb8340": {"dfnID":"6feb8340","dfnText":"global_type","external":true,"refSections":[{"refs":[{"id":"ref-for-embed-global-type"},{"id":"ref-for-embed-global-type\u2460"}],"title":"4.5. Globals"}],"url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-global-type"},
"71df74cb": {"dfnID":"71df74cb","dfnText":"mem_grow","external":true,"refSections":[{"refs":[{"id":"ref-for-embed-mem-grow"}],"title":"4.3. Memories"}],"url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-mem-grow"},
"73c746e9": {"dfnID":"73c746e9","dfnText":"table","external":true,"refSections":[{"refs":[{"id":"ref-for-external-types"},{"id":"ref-for-external-types\u2460"},{"id":"ref-for-external-types\u2461"},{"id":"ref-for-external-types\u2462"},{"id":"ref-for-external-types\u2463"},{"id":"ref-for-external-types\u2464"},{"id":"ref-for-external-types\u2465"},{"id":"ref-for-external-types\u2466"},{"id":"ref-for-external-types\u2467"},{"id":"ref-for-external-types\u2468"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-external-types\u2460\u24ea"},{"id":"ref-for-external-types\u2460\u2460"},{"id":"ref-for-external-types\u2460\u2461"},{"id":"ref-for-external-types\u2460\u2462"},{"id":"ref-for-external-types\u2460\u2463"}],"title":"4.1. Modules"}],"url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#external-types"},
"7638a6c8": {"dfnID":"7638a6c8","dfnText":"tag (for externtype)","external":true,"refSections":[{"refs":[{"id":"ref-for-external-types"},{"id":"ref-for-external-types\u2460"},{"id":"ref-for-external-types\u2461"},{"id":"ref-for-external-types\u2462"},{"id":"ref-for-external-types\u2463"},{"id":"ref-for-external-types\u2464"},{"id":"ref-for-external-types\u2465"},{"id":"ref-for-external-types\u2466"},{"id":"ref-for-external-types\u2467"},{"id":"ref-for-external-types\u2468"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-external-types\u2460\u24ea"},{"id":"ref-for-external-types\u2460\u2460"},{"id":"ref-for-external-types\u2460\u2461"},{"id":"ref-for-external-types\u2460\u2462"},{"id":"ref-for-external-types\u2460\u2463"}],"title":"4.1. Modules"}],"url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#external-types"},
"7b8e6024": {"dfnID":"7b8e6024","dfnText":"error","external":true,"refSections":[{"refs":[{"id":"ref-for-embed-error"},{"id":"ref-for-embed-error\u2460"},{"id":"ref-for-embed-error\u2461"},{"id":"ref-for-embed-error\u2462"},{"id":"ref-for-embed-error\u2463"},{"id":"ref-for-embed-error\u2464"},{"id":"ref-for-embed-error\u2465"},{"id":"ref-for-embed-error\u2466"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-embed-error\u2467"}],"title":"4.1. Modules"},{"refs":[{"id":"ref-for-embed-error\u2468"}],"title":"4.3. Memories"},{"refs":[{"id":"ref-for-embed-error\u2460\u24ea"},{"id":"ref-for-embed-error\u2460\u2460"},{"id":"ref-for-embed-error\u2460\u2461"}],"title":"4.4. Tables"},{"refs":[{"id":"ref-for-embed-error\u2460\u2462"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-embed-error\u2460\u2463"},{"id":"ref-for-embed-error\u2460\u2464"}],"title":"4.6. Exported Functions"}],"url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-error"},
"7deb6835": {"dfnID":"7deb6835","dfnText":"settings object","external":true,"refSections":[{"refs":[{"id":"ref-for-concept-realm-settings-object"}],"title":"4.6. Exported Functions"}],"url":"https://html.spec.whatwg.org/multipage/webappapis.html#concept-realm-settings-object"},
"7fdb209e": {"dfnID":"7fdb209e","dfnText":"table instance","external":true,"refSections":[{"refs":[{"id":"ref-for-table-instances"}],"title":"4.4. Tables"}],"url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#table-instances"},
"81131be0": {"dfnID":"81131be0","dfnText":"Call","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-call"}],"title":"4.6. Exported Functions"}],"url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-call"},
"82f68830": {"dfnID":"82f68830","dfnText":"memory.grow","external":true,"refSections":[{"refs":[{"id":"ref-for-exec-memory-grow"}],"title":"4.3. Memories"},{"refs":[{"id":"ref-for-exec-memory-grow\u2460"}],"title":"5.2. Out of Memory"}],"url":"https://webassembly.github.io/exception-handling/core/exec/instructions.html#exec-memory-grow"},
"838fa205": {"dfnID":"838fa205","dfnText":"global","external":true,"refSections":[{"refs":[{"id":"ref-for-external-types"},{"id":"ref-for-external-types\u2460"},{"id":"ref-for-external-types\u2461"},{"id":"ref-for-external-types\u2462"},{"id":"ref-for-external-types\u2463"},{"id":"ref-for-external-types\u2464"},{"id":"ref-for-external-types\u2465"},{"id":"ref-for-external-types\u2466"},{"id":"ref-for-external-types\u2467"},{"id":"ref-for-external-types\u2468"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-external-types\u2460\u24ea"},{"id":"ref-for-external-types\u2460\u2460"},{"id":"ref-for-external-types\u2460\u2461"},{"id":"ref-for-external-types\u2460\u2462"},{"id":"ref-for-external-types\u2460\u2463"}],"title":"4.1. Modules"}],"url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#external-types"},
"84b454ff": {"dfnID":"84b454ff","dfnText":"ordered map","external":true,"refSections":[{"refs":[{"id":"ref-for-ordered-map"}],"title":"3.2. WebAssembly JS Object Caches"}],"url":"https://infra.spec.whatwg.org/#ordered-map"},
"8649e124": {"dfnID":"8649e124","dfnText":"signif","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-float"},{"id":"ref-for-syntax-float\u2460"},{"id":"ref-for-syntax-float\u2461"},{"id":"ref-for-syntax-float\u2462"},{"id":"ref-for-syntax-float\u2463"},{"id":"ref-for-syntax-float\u2464"},{"id":"ref-for-syntax-float\u2465"},{"id":"ref-for-syntax-float\u2466"},{"id":"ref-for-syntax-float\u2467"},{"id":"ref-for-syntax-float\u2468"},{"id":"ref-for-syntax-float\u2460\u24ea"},{"id":"ref-for-syntax-float\u2460\u2460"}],"title":"4.6. Exported Functions"}],"url":"https://webassembly.github.io/exception-handling/core/syntax/values.html#syntax-float"},
"8855a9aa": {"dfnID":"8855a9aa","dfnText":"DOMString","external":true,"refSections":[{"refs":[{"id":"ref-for-idl-DOMString"}],"title":"4.1. Modules"},{"refs":[{"id":"ref-for-idl-DOMString\u2460"},{"id":"ref-for-idl-DOMString\u2461"}],"title":"4.7.2. Runtime exceptions"}],"url":"https://webidl.spec.whatwg.org/#idl-DOMString"},
"889e932f": {"dfnID":"889e932f","dfnText":"Exposed","external":true,"refSections":[{"refs":[{"id":"ref-for-Exposed"}],"title":"4.7.1. Exception types"},{"refs":[{"id":"ref-for-Exposed\u2460"}],"title":"4.7.2. Runtime exceptions"}],"url":"https://webidl.spec.whatwg.org/#Exposed"},
"8b2a5c87": {"dfnID":"8b2a5c87","dfnText":"\u2124","external":true,"refSections":[{"refs":[{"id":"ref-for-\u2124"}],"title":"4.6. Exported Functions"}],"url":"https://tc39.github.io/ecma262/#\u2124"},
"8bccf30f": {"dfnID":"8bccf30f","dfnText":"module_validate","external":true,"refSections":[{"refs":[{"id":"ref-for-embed-module-validate"}],"title":"4. The WebAssembly Namespace"}],"url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-module-validate"},
"9291eb1c": {"dfnID":"9291eb1c","dfnText":"ref.extern","external":true,"refSections":[{"refs":[{"id":"ref-for-values"}],"title":"4.3. Memories"},{"refs":[{"id":"ref-for-values\u2460"},{"id":"ref-for-values\u2461"},{"id":"ref-for-values\u2462"},{"id":"ref-for-values\u2463"},{"id":"ref-for-values\u2464"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-values\u2465"},{"id":"ref-for-values\u2466"},{"id":"ref-for-values\u2467"},{"id":"ref-for-values\u2468"},{"id":"ref-for-values\u2460\u24ea"},{"id":"ref-for-values\u2460\u2460"},{"id":"ref-for-values\u2460\u2461"},{"id":"ref-for-values\u2460\u2462"},{"id":"ref-for-values\u2460\u2463"},{"id":"ref-for-values\u2460\u2464"},{"id":"ref-for-values\u2460\u2465"},{"id":"ref-for-values\u2460\u2466"},{"id":"ref-for-values\u2460\u2467"},{"id":"ref-for-values\u2460\u2468"},{"id":"ref-for-values\u2461\u24ea"},{"id":"ref-for-values\u2461\u2460"},{"id":"ref-for-values\u2461\u2461"},{"id":"ref-for-values\u2461\u2462"},{"id":"ref-for-values\u2461\u2463"},{"id":"ref-for-values\u2461\u2464"},{"id":"ref-for-values\u2461\u2465"},{"id":"ref-for-values\u2461\u2466"}],"title":"4.6. Exported Functions"}],"url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#values"},
"92d13070": {"dfnID":"92d13070","dfnText":"get a copy of the buffer source","external":true,"refSections":[{"refs":[{"id":"ref-for-dfn-get-buffer-source-copy"},{"id":"ref-for-dfn-get-buffer-source-copy\u2460"},{"id":"ref-for-dfn-get-buffer-source-copy\u2461"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-dfn-get-buffer-source-copy\u2462"}],"title":"4.1. Modules"}],"url":"https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy"},
"95835c10": {"dfnID":"95835c10","dfnText":"global_read","external":true,"refSections":[{"refs":[{"id":"ref-for-embed-global-read"}],"title":"4.5. Globals"}],"url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-global-read"},
"98663f63": {"dfnID":"98663f63","dfnText":"v128.const","external":true,"refSections":[{"refs":[{"id":"ref-for-values"}],"title":"4.3. Memories"},{"refs":[{"id":"ref-for-values\u2460"},{"id":"ref-for-values\u2461"},{"id":"ref-for-values\u2462"},{"id":"ref-for-values\u2463"},{"id":"ref-for-values\u2464"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-values\u2465"},{"id":"ref-for-values\u2466"},{"id":"ref-for-values\u2467"},{"id":"ref-for-values\u2468"},{"id":"ref-for-values\u2460\u24ea"},{"id":"ref-for-values\u2460\u2460"},{"id":"ref-for-values\u2460\u2461"},{"id":"ref-for-values\u2460\u2462"},{"id":"ref-for-values\u2460\u2463"},{"id":"ref-for-values\u2460\u2464"},{"id":"ref-for-values\u2460\u2465"},{"id":"ref-for-values\u2460\u2466"},{"id":"ref-for-values\u2460\u2467"},{"id":"ref-for-values\u2460\u2468"},{"id":"ref-for-values\u2461\u24ea"},{"id":"ref-for-values\u2461\u2460"},{"id":"ref-for-values\u2461\u2461"},{"id":"ref-for-values\u2461\u2462"},{"id":"ref-for-values\u2461\u2463"},{"id":"ref-for-values\u2461\u2464"},{"id":"ref-for-values\u2461\u2465"},{"id":"ref-for-values\u2461\u2466"}],"title":"4.6. Exported Functions"}],"url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#values"},
"9a517a7d": {"dfnID":"9a517a7d","dfnText":"queue a task","external":true,"refSections":[{"refs":[{"id":"ref-for-queue-a-task"},{"id":"ref-for-queue-a-task\u2460"}],"title":"4. The WebAssembly Namespace"}],"url":"https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task"},
"9ab06711": {"dfnID":"9ab06711","dfnText":"ToNumber","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-tonumber"},{"id":"ref-for-sec-tonumber\u2460"}],"title":"4.6. Exported Functions"}],"url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-tonumber"},
"9cce47fd": {"dfnID":"9cce47fd","dfnText":"sequence","external":true,"refSections":[{"refs":[{"id":"ref-for-idl-sequence"},{"id":"ref-for-idl-sequence\u2460"},{"id":"ref-for-idl-sequence\u2461"}],"title":"4.1. Modules"},{"refs":[{"id":"ref-for-idl-sequence\u2462"}],"title":"4.7.1. Exception types"},{"refs":[{"id":"ref-for-idl-sequence\u2463"}],"title":"4.7.2. Runtime exceptions"}],"url":"https://webidl.spec.whatwg.org/#idl-sequence"},
"a-new-exported-function": {"dfnID":"a-new-exported-function","dfnText":"a new Exported Function","external":false,"refSections":[{"refs":[{"id":"ref-for-a-new-exported-function"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-a-new-exported-function\u2460"}],"title":"4.6. Exported Functions"}],"url":"#a-new-exported-function"},
"a20d03f5": {"dfnID":"a20d03f5","dfnText":"signed_64","external":true,"refSections":[{"refs":[{"id":"ref-for-aux-signed"},{"id":"ref-for-aux-signed\u2460"}],"title":"4.6. Exported Functions"}],"url":"https://webassembly.github.io/exception-handling/core/exec/numerics.html#aux-signed"},
"a32c65d4": {"dfnID":"a32c65d4","dfnText":"implements","external":true,"refSections":[{"refs":[{"id":"ref-for-implements"},{"id":"ref-for-implements\u2460"},{"id":"ref-for-implements\u2461"},{"id":"ref-for-implements\u2462"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-implements\u2463"}],"title":"4.6. Exported Functions"}],"url":"https://webidl.spec.whatwg.org/#implements"},
"a32d22b4": {"dfnID":"a32d22b4","dfnText":"func_alloc","external":true,"refSections":[{"refs":[{"id":"ref-for-embed-func-alloc"}],"title":"4.6. Exported Functions"}],"url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-func-alloc"},
"a414795d": {"dfnID":"a414795d","dfnText":"store","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-store"}],"title":"3.1. Interaction of the WebAssembly Store with JavaScript"}],"url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-store"},
"a72449dd": {"dfnID":"a72449dd","dfnText":"in parallel","external":true,"refSections":[{"refs":[{"id":"ref-for-in-parallel"},{"id":"ref-for-in-parallel\u2460"}],"title":"4. The WebAssembly Namespace"}],"url":"https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel"},
"a77ae14e": {"dfnID":"a77ae14e","dfnText":"customsec","external":true,"refSections":[{"refs":[{"id":"ref-for-binary-customsec"}],"title":"4.1. Modules"}],"url":"https://webassembly.github.io/exception-handling/core/binary/modules.html#binary-customsec"},
"a77af972": {"dfnID":"a77af972","dfnText":"func_invoke","external":true,"refSections":[{"refs":[{"id":"ref-for-embed-func-invoke"},{"id":"ref-for-embed-func-invoke\u2460"}],"title":"4.6. Exported Functions"}],"url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-func-invoke"},
"abf85593": {"dfnID":"abf85593","dfnText":"Get","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-get-o-p"},{"id":"ref-for-sec-get-o-p\u2460"}],"title":"4. The WebAssembly Namespace"}],"url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-get-o-p"},
"adad4e58": {"dfnID":"adad4e58","dfnText":"function address","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-funcaddr"}],"title":"3.2. WebAssembly JS Object Caches"},{"refs":[{"id":"ref-for-syntax-funcaddr\u2460"},{"id":"ref-for-syntax-funcaddr\u2461"},{"id":"ref-for-syntax-funcaddr\u2462"}],"title":"4.6. Exported Functions"}],"url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-funcaddr"},
"associated-store": {"dfnID":"associated-store","dfnText":"associated store","external":false,"refSections":[{"refs":[{"id":"ref-for-associated-store"},{"id":"ref-for-associated-store\u2460"},{"id":"ref-for-associated-store\u2461"},{"id":"ref-for-associated-store\u2462"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-associated-store\u2463"},{"id":"ref-for-associated-store\u2464"},{"id":"ref-for-associated-store\u2465"},{"id":"ref-for-associated-store\u2466"}],"title":"4.3. Memories"},{"refs":[{"id":"ref-for-associated-store\u2467"},{"id":"ref-for-associated-store\u2468"},{"id":"ref-for-associated-store\u2460\u24ea"},{"id":"ref-for-associated-store\u2460\u2460"},{"id":"ref-for-associated-store\u2460\u2461"},{"id":"ref-for-associated-store\u2460\u2462"},{"id":"ref-for-associated-store\u2460\u2463"},{"id":"ref-for-associated-store\u2460\u2464"}],"title":"4.4. Tables"},{"refs":[{"id":"ref-for-associated-store\u2460\u2465"},{"id":"ref-for-associated-store\u2460\u2466"},{"id":"ref-for-associated-store\u2460\u2467"},{"id":"ref-for-associated-store\u2460\u2468"},{"id":"ref-for-associated-store\u2461\u24ea"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-associated-store\u2461\u2460"},{"id":"ref-for-associated-store\u2461\u2461"},{"id":"ref-for-associated-store\u2461\u2462"},{"id":"ref-for-associated-store\u2461\u2463"},{"id":"ref-for-associated-store\u2461\u2464"},{"id":"ref-for-associated-store\u2461\u2465"},{"id":"ref-for-associated-store\u2461\u2466"}],"title":"4.6. Exported Functions"},{"refs":[{"id":"ref-for-associated-store\u2461\u2467"},{"id":"ref-for-associated-store\u2461\u2468"},{"id":"ref-for-associated-store\u2462\u24ea"}],"title":"4.7.1. Exception types"},{"refs":[{"id":"ref-for-associated-store\u2462\u2460"},{"id":"ref-for-associated-store\u2462\u2461"}],"title":"4.7.2. Runtime exceptions"},{"refs":[{"id":"ref-for-associated-store\u2462\u2462"}],"title":"4.7.3. JavaScript exceptions"}],"url":"#associated-store"},
"asynchronously-compile-a-webassembly-module": {"dfnID":"asynchronously-compile-a-webassembly-module","dfnText":"asynchronously compile a WebAssembly module","external":false,"refSections":[{"refs":[{"id":"ref-for-asynchronously-compile-a-webassembly-module"},{"id":"ref-for-asynchronously-compile-a-webassembly-module\u2460"}],"title":"4. The WebAssembly Namespace"}],"url":"#asynchronously-compile-a-webassembly-module"},
"asynchronously-instantiate-a-webassembly-module": {"dfnID":"asynchronously-instantiate-a-webassembly-module","dfnText":"asynchronously instantiate a WebAssembly module","external":false,"refSections":[{"refs":[{"id":"ref-for-asynchronously-instantiate-a-webassembly-module"},{"id":"ref-for-asynchronously-instantiate-a-webassembly-module\u2460"}],"title":"4. The WebAssembly Namespace"}],"url":"#asynchronously-instantiate-a-webassembly-module"},
"b0d7f3c3": {"dfnID":"b0d7f3c3","dfnText":"USVString","external":true,"refSections":[{"refs":[{"id":"ref-for-idl-USVString"},{"id":"ref-for-idl-USVString\u2460"},{"id":"ref-for-idl-USVString\u2461"}],"title":"4.1. Modules"}],"url":"https://webidl.spec.whatwg.org/#idl-USVString"},
"b107f911": {"dfnID":"b107f911","dfnText":"current Realm","external":true,"refSections":[{"refs":[{"id":"ref-for-current-realm"}],"title":"4.6. Exported Functions"}],"url":"https://tc39.github.io/ecma262/#current-realm"},
"b179eb48": {"dfnID":"b179eb48","dfnText":"global_write","external":true,"refSections":[{"refs":[{"id":"ref-for-embed-global-write"}],"title":"4.5. Globals"}],"url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-global-write"},
"b262501e": {"dfnID":"b262501e","dfnText":"reject","external":true,"refSections":[{"refs":[{"id":"ref-for-reject"},{"id":"ref-for-reject\u2460"},{"id":"ref-for-reject\u2461"},{"id":"ref-for-reject\u2462"},{"id":"ref-for-reject\u2463"}],"title":"4. The WebAssembly Namespace"}],"url":"https://webidl.spec.whatwg.org/#reject"},
"b265d014": {"dfnID":"b265d014","dfnText":"\u2212\u221e","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-float"},{"id":"ref-for-syntax-float\u2460"},{"id":"ref-for-syntax-float\u2461"},{"id":"ref-for-syntax-float\u2462"},{"id":"ref-for-syntax-float\u2463"},{"id":"ref-for-syntax-float\u2464"},{"id":"ref-for-syntax-float\u2465"},{"id":"ref-for-syntax-float\u2466"},{"id":"ref-for-syntax-float\u2467"},{"id":"ref-for-syntax-float\u2468"},{"id":"ref-for-syntax-float\u2460\u24ea"},{"id":"ref-for-syntax-float\u2460\u2460"}],"title":"4.6. Exported Functions"}],"url":"https://webassembly.github.io/exception-handling/core/syntax/values.html#syntax-float"},
"b29f5d72": {"dfnID":"b29f5d72","dfnText":"ToBigInt64","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-tobigint64"}],"title":"4.6. Exported Functions"}],"url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-tobigint64"},
"b46548cb": {"dfnID":"b46548cb","dfnText":"memaddrs","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-moduleinst"},{"id":"ref-for-syntax-moduleinst\u2460"}],"title":"4.3. Memories"}],"url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-moduleinst"},
"b5c3b552": {"dfnID":"b5c3b552","dfnText":"prepare to run a callback","external":true,"refSections":[{"refs":[{"id":"ref-for-prepare-to-run-a-callback"}],"title":"4.6. Exported Functions"}],"url":"https://html.spec.whatwg.org/multipage/webappapis.html#prepare-to-run-a-callback"},
"b6a1ae3f": {"dfnID":"b6a1ae3f","dfnText":"clean up after running script","external":true,"refSections":[{"refs":[{"id":"ref-for-clean-up-after-running-script"}],"title":"4.6. Exported Functions"}],"url":"https://html.spec.whatwg.org/multipage/webappapis.html#clean-up-after-running-script"},
"ba0496a7": {"dfnID":"ba0496a7","dfnText":"global instance","external":true,"refSections":[{"refs":[{"id":"ref-for-global-instances"}],"title":"4.5. Globals"}],"url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#global-instances"},
"ba26917b": {"dfnID":"ba26917b","dfnText":"external value","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-externval"},{"id":"ref-for-syntax-externval\u2460"},{"id":"ref-for-syntax-externval\u2461"},{"id":"ref-for-syntax-externval\u2462"},{"id":"ref-for-syntax-externval\u2463"},{"id":"ref-for-syntax-externval\u2464"},{"id":"ref-for-syntax-externval\u2465"},{"id":"ref-for-syntax-externval\u2466"},{"id":"ref-for-syntax-externval\u2467"},{"id":"ref-for-syntax-externval\u2468"},{"id":"ref-for-syntax-externval\u2460\u24ea"},{"id":"ref-for-syntax-externval\u2460\u2460"},{"id":"ref-for-syntax-externval\u2460\u2461"},{"id":"ref-for-syntax-externval\u2460\u2462"},{"id":"ref-for-syntax-externval\u2460\u2463"},{"id":"ref-for-syntax-externval\u2460\u2464"},{"id":"ref-for-syntax-externval\u2460\u2465"},{"id":"ref-for-syntax-externval\u2460\u2466"},{"id":"ref-for-syntax-externval\u2460\u2467"}],"title":"4. The WebAssembly Namespace"}],"url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externval"},
"bb8f2f23": {"dfnID":"bb8f2f23","dfnText":"create a namespace object","external":true,"refSections":[{"refs":[{"id":"ref-for-create-a-namespace-object"}],"title":"4.8. Error Objects"}],"url":"https://heycam.github.io/webidl/#create-a-namespace-object"},
"bdbd19d1": {"dfnID":"bdbd19d1","dfnText":"Promise","external":true,"refSections":[{"refs":[{"id":"ref-for-idl-promise"},{"id":"ref-for-idl-promise\u2460"},{"id":"ref-for-idl-promise\u2461"}],"title":"4. The WebAssembly Namespace"}],"url":"https://webidl.spec.whatwg.org/#idl-promise"},
"bf58abd6": {"dfnID":"bf58abd6","dfnText":"current frame","external":true,"refSections":[{"refs":[{"id":"ref-for-exec-notation-textual"}],"title":"4.3. Memories"}],"url":"https://webassembly.github.io/exception-handling/core/exec/conventions.html#exec-notation-textual"},
"c01cbda0": {"dfnID":"c01cbda0","dfnText":"EnforceRange","external":true,"refSections":[{"refs":[{"id":"ref-for-EnforceRange"},{"id":"ref-for-EnforceRange\u2460"},{"id":"ref-for-EnforceRange\u2461"}],"title":"4.3. Memories"},{"refs":[{"id":"ref-for-EnforceRange\u2462"},{"id":"ref-for-EnforceRange\u2463"},{"id":"ref-for-EnforceRange\u2464"},{"id":"ref-for-EnforceRange\u2465"},{"id":"ref-for-EnforceRange\u2466"}],"title":"4.4. Tables"},{"refs":[{"id":"ref-for-EnforceRange\u2467"}],"title":"4.7.2. Runtime exceptions"}],"url":"https://webidl.spec.whatwg.org/#EnforceRange"},
"c2033417": {"dfnID":"c2033417","dfnText":"reftype","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-reftype"}],"title":"4.4. Tables"},{"refs":[{"id":"ref-for-syntax-reftype\u2460"},{"id":"ref-for-syntax-reftype\u2461"},{"id":"ref-for-syntax-reftype\u2462"},{"id":"ref-for-syntax-reftype\u2463"},{"id":"ref-for-syntax-reftype\u2464"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-syntax-reftype\u2465"},{"id":"ref-for-syntax-reftype\u2466"},{"id":"ref-for-syntax-reftype\u2467"},{"id":"ref-for-syntax-reftype\u2468"},{"id":"ref-for-syntax-reftype\u2460\u24ea"},{"id":"ref-for-syntax-reftype\u2460\u2460"}],"title":"4.6. Exported Functions"},{"refs":[{"id":"ref-for-syntax-reftype\u2460\u2461"}],"title":"4.7.3. JavaScript exceptions"}],"url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-reftype"},
"c2359c09": {"dfnID":"c2359c09","dfnText":"prepare to run script","external":true,"refSections":[{"refs":[{"id":"ref-for-prepare-to-run-script"}],"title":"4.6. Exported Functions"}],"url":"https://html.spec.whatwg.org/multipage/webappapis.html#prepare-to-run-script"},
"c3b271ac": {"dfnID":"c3b271ac","dfnText":"\ud835\udd3d","external":true,"refSections":[{"refs":[{"id":"ref-for-\ud835\udd3d"},{"id":"ref-for-\ud835\udd3d\u2460"},{"id":"ref-for-\ud835\udd3d\u2461"}],"title":"4.6. Exported Functions"}],"url":"https://tc39.github.io/ecma262/#\ud835\udd3d"},
"c3b2d08c": {"dfnID":"c3b2d08c","dfnText":"task source","external":true,"refSections":[{"refs":[{"id":"ref-for-task-source"}],"title":"4. The WebAssembly Namespace"}],"url":"https://html.spec.whatwg.org/multipage/webappapis.html#task-source"},
"c4df1374": {"dfnID":"c4df1374","dfnText":"Type","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-ecmascript-data-types-and-values"},{"id":"ref-for-sec-ecmascript-data-types-and-values\u2460"},{"id":"ref-for-sec-ecmascript-data-types-and-values\u2461"},{"id":"ref-for-sec-ecmascript-data-types-and-values\u2462"}],"title":"4. The WebAssembly Namespace"}],"url":"https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values"},
"c8a48e34": {"dfnID":"c8a48e34","dfnText":"table_alloc","external":true,"refSections":[{"refs":[{"id":"ref-for-embed-table-alloc"}],"title":"4.4. Tables"}],"url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-table-alloc"},
"c8ecd3b3": {"dfnID":"c8ecd3b3","dfnText":"valid","external":true,"refSections":[{"refs":[{"id":"ref-for-valid-module"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-valid-module\u2460"}],"title":"4.1. Modules"}],"url":"https://webassembly.github.io/exception-handling/core/valid/modules.html#valid-module"},
"call-an-exported-function": {"dfnID":"call-an-exported-function","dfnText":"call an Exported Function","external":false,"refSections":[{"refs":[{"id":"ref-for-call-an-exported-function"},{"id":"ref-for-call-an-exported-function\u2460"}],"title":"4.6. Exported Functions"}],"url":"#call-an-exported-function"},
"cd4b1dc4": {"dfnID":"cd4b1dc4","dfnText":"!","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-returnifabrupt-shorthands"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2460"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2461"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2462"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2463"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-sec-returnifabrupt-shorthands\u2464"}],"title":"4.3. Memories"},{"refs":[{"id":"ref-for-sec-returnifabrupt-shorthands\u2465"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2466"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2467"}],"title":"4.4. Tables"},{"refs":[{"id":"ref-for-sec-returnifabrupt-shorthands\u2468"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2460\u24ea"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2460\u2460"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2460\u2461"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2460\u2462"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2460\u2463"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2460\u2464"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2460\u2465"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2460\u2466"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2460\u2467"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2460\u2468"}],"title":"4.6. Exported Functions"},{"refs":[{"id":"ref-for-sec-returnifabrupt-shorthands\u2461\u24ea"}],"title":"4.8. Error Objects"}],"url":"https://tc39.github.io/ecma262/#sec-returnifabrupt-shorthands"},
"ce974fac": {"dfnID":"ce974fac","dfnText":"signed_32","external":true,"refSections":[{"refs":[{"id":"ref-for-aux-signed"},{"id":"ref-for-aux-signed\u2460"}],"title":"4.6. Exported Functions"}],"url":"https://webassembly.github.io/exception-handling/core/exec/numerics.html#aux-signed"},
"cf03009b": {"dfnID":"cf03009b","dfnText":"exception","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-tagtype"},{"id":"ref-for-syntax-tagtype\u2460"}],"title":"4. The WebAssembly Namespace"}],"url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-tagtype"},
"compile-a-webassembly-module": {"dfnID":"compile-a-webassembly-module","dfnText":"compile a WebAssembly module","external":false,"refSections":[{"refs":[{"id":"ref-for-compile-a-webassembly-module"},{"id":"ref-for-compile-a-webassembly-module\u2460"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-compile-a-webassembly-module\u2461"}],"title":"4.1. Modules"}],"url":"#compile-a-webassembly-module"},
"construct-a-webassembly-module-object": {"dfnID":"construct-a-webassembly-module-object","dfnText":"construct a WebAssembly module object","external":false,"refSections":[{"refs":[{"id":"ref-for-construct-a-webassembly-module-object"}],"title":"4. The WebAssembly Namespace"}],"url":"#construct-a-webassembly-module-object"},
"create-a-global-object": {"dfnID":"create-a-global-object","dfnText":"create a global object","external":false,"refSections":[{"refs":[{"id":"ref-for-create-a-global-object"}],"title":"4. The WebAssembly Namespace"}],"url":"#create-a-global-object"},
"create-a-host-function": {"dfnID":"create-a-host-function","dfnText":"create a host function","external":false,"refSections":[{"refs":[{"id":"ref-for-create-a-host-function"}],"title":"4. The WebAssembly Namespace"}],"url":"#create-a-host-function"},
"create-a-memory-buffer": {"dfnID":"create-a-memory-buffer","dfnText":"create a memory buffer","external":false,"refSections":[{"refs":[{"id":"ref-for-create-a-memory-buffer"},{"id":"ref-for-create-a-memory-buffer\u2460"}],"title":"4.3. Memories"}],"url":"#create-a-memory-buffer"},
"create-a-memory-object": {"dfnID":"create-a-memory-object","dfnText":"create a memory object","external":false,"refSections":[{"refs":[{"id":"ref-for-create-a-memory-object"}],"title":"4. The WebAssembly Namespace"}],"url":"#create-a-memory-object"},
"create-a-table-object": {"dfnID":"create-a-table-object","dfnText":"create a table object","external":false,"refSections":[{"refs":[{"id":"ref-for-create-a-table-object"}],"title":"4. The WebAssembly Namespace"}],"url":"#create-a-table-object"},
"create-a-tag-object": {"dfnID":"create-a-tag-object","dfnText":"create a Tag object","external":false,"refSections":[{"refs":[{"id":"ref-for-create-a-tag-object"}],"title":"4. The WebAssembly Namespace"}],"url":"#create-a-tag-object"},
"create-an-exception-object": {"dfnID":"create-an-exception-object","dfnText":"create an Exception object","external":false,"refSections":[{"refs":[{"id":"ref-for-create-an-exception-object"}],"title":"4.6. Exported Functions"}],"url":"#create-an-exception-object"},
"create-an-exports-object": {"dfnID":"create-an-exports-object","dfnText":"create an exports object","external":false,"refSections":[{"refs":[{"id":"ref-for-create-an-exports-object"}],"title":"4. The WebAssembly Namespace"}],"url":"#create-an-exports-object"},
"d2c61922": {"dfnID":"d2c61922","dfnText":"CreateDataProperty","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-createdataproperty"}],"title":"4. The WebAssembly Namespace"}],"url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-createdataproperty"},
"d5ac3b38": {"dfnID":"d5ac3b38","dfnText":"clean up after running a callback","external":true,"refSections":[{"refs":[{"id":"ref-for-clean-up-after-running-a-callback"}],"title":"4.6. Exported Functions"}],"url":"https://html.spec.whatwg.org/multipage/webappapis.html#clean-up-after-running-a-callback"},
"d62c469f": {"dfnID":"d62c469f","dfnText":"func","external":true,"refSections":[{"refs":[{"id":"ref-for-external-types"},{"id":"ref-for-external-types\u2460"},{"id":"ref-for-external-types\u2461"},{"id":"ref-for-external-types\u2462"},{"id":"ref-for-external-types\u2463"},{"id":"ref-for-external-types\u2464"},{"id":"ref-for-external-types\u2465"},{"id":"ref-for-external-types\u2466"},{"id":"ref-for-external-types\u2467"},{"id":"ref-for-external-types\u2468"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-external-types\u2460\u24ea"},{"id":"ref-for-external-types\u2460\u2460"},{"id":"ref-for-external-types\u2460\u2461"},{"id":"ref-for-external-types\u2460\u2462"},{"id":"ref-for-external-types\u2460\u2463"}],"title":"4.1. Modules"}],"url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#external-types"},
"d724c2ce": {"dfnID":"d724c2ce","dfnText":"module_decode","external":true,"refSections":[{"refs":[{"id":"ref-for-embed-module-decode"}],"title":"4. The WebAssembly Namespace"}],"url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-module-decode"},
"d7a47d32": {"dfnID":"d7a47d32","dfnText":"DetachArrayBuffer","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-detacharraybuffer"}],"title":"4.3. Memories"}],"url":"https://tc39.es/ecma262/multipage/structured-data.html#sec-detacharraybuffer"},
"d7af7adc": {"dfnID":"d7af7adc","dfnText":"incumbent settings object","external":true,"refSections":[{"refs":[{"id":"ref-for-incumbent-settings-object"}],"title":"4.6. Exported Functions"}],"url":"https://html.spec.whatwg.org/multipage/webappapis.html#incumbent-settings-object"},
"d7b1f215": {"dfnID":"d7b1f215","dfnText":"nan","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-float"},{"id":"ref-for-syntax-float\u2460"},{"id":"ref-for-syntax-float\u2461"},{"id":"ref-for-syntax-float\u2462"},{"id":"ref-for-syntax-float\u2463"},{"id":"ref-for-syntax-float\u2464"},{"id":"ref-for-syntax-float\u2465"},{"id":"ref-for-syntax-float\u2466"},{"id":"ref-for-syntax-float\u2467"},{"id":"ref-for-syntax-float\u2468"},{"id":"ref-for-syntax-float\u2460\u24ea"},{"id":"ref-for-syntax-float\u2460\u2460"}],"title":"4.6. Exported Functions"}],"url":"https://webassembly.github.io/exception-handling/core/syntax/values.html#syntax-float"},
"da3b3eb5": {"dfnID":"da3b3eb5","dfnText":"table_grow","external":true,"refSections":[{"refs":[{"id":"ref-for-embed-table-grow"}],"title":"4.4. Tables"}],"url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-table-grow"},
"dacde8b5": {"dfnID":"dacde8b5","dfnText":"a new promise","external":true,"refSections":[{"refs":[{"id":"ref-for-a-new-promise"},{"id":"ref-for-a-new-promise\u2460"},{"id":"ref-for-a-new-promise\u2461"}],"title":"4. The WebAssembly Namespace"}],"url":"https://webidl.spec.whatwg.org/#a-new-promise"},
"dc07163b": {"dfnID":"dc07163b","dfnText":"IsCallable","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-iscallable"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-sec-iscallable\u2460"},{"id":"ref-for-sec-iscallable\u2461"}],"title":"4.6. Exported Functions"}],"url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-iscallable"},
"dedcd6a0": {"dfnID":"dedcd6a0","dfnText":"host function","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-hostfunc"}],"title":"4.6. Exported Functions"}],"url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-hostfunc"},
"defaultvalue": {"dfnID":"defaultvalue","dfnText":"DefaultValue","external":false,"refSections":[{"refs":[{"id":"ref-for-defaultvalue"},{"id":"ref-for-defaultvalue\u2460"},{"id":"ref-for-defaultvalue\u2461"}],"title":"4.4. Tables"},{"refs":[{"id":"ref-for-defaultvalue\u2462"}],"title":"4.5. Globals"}],"url":"#defaultvalue"},
"dff98a97": {"dfnID":"dff98a97","dfnText":"i32.const","external":true,"refSections":[{"refs":[{"id":"ref-for-values"}],"title":"4.3. Memories"},{"refs":[{"id":"ref-for-values\u2460"},{"id":"ref-for-values\u2461"},{"id":"ref-for-values\u2462"},{"id":"ref-for-values\u2463"},{"id":"ref-for-values\u2464"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-values\u2465"},{"id":"ref-for-values\u2466"},{"id":"ref-for-values\u2467"},{"id":"ref-for-values\u2468"},{"id":"ref-for-values\u2460\u24ea"},{"id":"ref-for-values\u2460\u2460"},{"id":"ref-for-values\u2460\u2461"},{"id":"ref-for-values\u2460\u2462"},{"id":"ref-for-values\u2460\u2463"},{"id":"ref-for-values\u2460\u2464"},{"id":"ref-for-values\u2460\u2465"},{"id":"ref-for-values\u2460\u2466"},{"id":"ref-for-values\u2460\u2467"},{"id":"ref-for-values\u2460\u2468"},{"id":"ref-for-values\u2461\u24ea"},{"id":"ref-for-values\u2461\u2460"},{"id":"ref-for-values\u2461\u2461"},{"id":"ref-for-values\u2461\u2462"},{"id":"ref-for-values\u2461\u2463"},{"id":"ref-for-values\u2461\u2464"},{"id":"ref-for-values\u2461\u2465"},{"id":"ref-for-values\u2461\u2466"}],"title":"4.6. Exported Functions"}],"url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#values"},
"dictdef-exceptionoptions": {"dfnID":"dictdef-exceptionoptions","dfnText":"ExceptionOptions","external":false,"refSections":[{"refs":[{"id":"ref-for-dictdef-exceptionoptions"}],"title":"4.7.2. Runtime exceptions"}],"url":"#dictdef-exceptionoptions"},
"dictdef-globaldescriptor": {"dfnID":"dictdef-globaldescriptor","dfnText":"GlobalDescriptor","external":false,"refSections":[{"refs":[{"id":"ref-for-dictdef-globaldescriptor"}],"title":"4.5. Globals"}],"url":"#dictdef-globaldescriptor"},
"dictdef-memorydescriptor": {"dfnID":"dictdef-memorydescriptor","dfnText":"MemoryDescriptor","external":false,"refSections":[{"refs":[{"id":"ref-for-dictdef-memorydescriptor"}],"title":"4.3. Memories"}],"url":"#dictdef-memorydescriptor"},
"dictdef-moduleexportdescriptor": {"dfnID":"dictdef-moduleexportdescriptor","dfnText":"ModuleExportDescriptor","external":false,"refSections":[{"refs":[{"id":"ref-for-dictdef-moduleexportdescriptor"}],"title":"4.1. Modules"}],"url":"#dictdef-moduleexportdescriptor"},
"dictdef-moduleimportdescriptor": {"dfnID":"dictdef-moduleimportdescriptor","dfnText":"ModuleImportDescriptor","external":false,"refSections":[{"refs":[{"id":"ref-for-dictdef-moduleimportdescriptor"}],"title":"4.1. Modules"}],"url":"#dictdef-moduleimportdescriptor"},
"dictdef-tabledescriptor": {"dfnID":"dictdef-tabledescriptor","dfnText":"TableDescriptor","external":false,"refSections":[{"refs":[{"id":"ref-for-dictdef-tabledescriptor"}],"title":"4.4. Tables"}],"url":"#dictdef-tabledescriptor"},
"dictdef-tagtype": {"dfnID":"dictdef-tagtype","dfnText":"TagType","external":false,"refSections":[{"refs":[{"id":"ref-for-dictdef-tagtype"},{"id":"ref-for-dictdef-tagtype\u2460"}],"title":"4.7.1. Exception types"}],"url":"#dictdef-tagtype"},
"dictdef-webassemblyinstantiatedsource": {"dfnID":"dictdef-webassemblyinstantiatedsource","dfnText":"WebAssemblyInstantiatedSource","external":false,"refSections":[{"refs":[{"id":"ref-for-dictdef-webassemblyinstantiatedsource"},{"id":"ref-for-dictdef-webassemblyinstantiatedsource\u2460"}],"title":"4. The WebAssembly Namespace"}],"url":"#dictdef-webassemblyinstantiatedsource"},
"dom-exception-exception": {"dfnID":"dom-exception-exception","dfnText":"new Exception(exceptionTag, payload, options)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-exception-exception"}],"title":"4.7.2. Runtime exceptions"}],"url":"#dom-exception-exception"},
"dom-exception-exception-exceptiontag-payload-options-exceptiontag": {"dfnID":"dom-exception-exception-exceptiontag-payload-options-exceptiontag","dfnText":"exceptionTag","external":false,"refSections":[],"url":"#dom-exception-exception-exceptiontag-payload-options-exceptiontag"},
"dom-exception-exception-exceptiontag-payload-options-options": {"dfnID":"dom-exception-exception-exceptiontag-payload-options-options","dfnText":"options","external":false,"refSections":[],"url":"#dom-exception-exception-exceptiontag-payload-options-options"},
"dom-exception-exception-exceptiontag-payload-options-payload": {"dfnID":"dom-exception-exception-exceptiontag-payload-options-payload","dfnText":"payload","external":false,"refSections":[],"url":"#dom-exception-exception-exceptiontag-payload-options-payload"},
"dom-exception-getarg": {"dfnID":"dom-exception-getarg","dfnText":"getArg(exceptionTag, index)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-exception-getarg"}],"title":"4.7.2. Runtime exceptions"}],"url":"#dom-exception-getarg"},
"dom-exception-getarg-exceptiontag-index-exceptiontag": {"dfnID":"dom-exception-getarg-exceptiontag-index-exceptiontag","dfnText":"exceptionTag","external":false,"refSections":[],"url":"#dom-exception-getarg-exceptiontag-index-exceptiontag"},
"dom-exception-getarg-exceptiontag-index-index": {"dfnID":"dom-exception-getarg-exceptiontag-index-index","dfnText":"index","external":false,"refSections":[],"url":"#dom-exception-getarg-exceptiontag-index-index"},
"dom-exception-is": {"dfnID":"dom-exception-is","dfnText":"is(exceptionTag)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-exception-is"}],"title":"4.7.2. Runtime exceptions"}],"url":"#dom-exception-is"},
"dom-exception-is-exceptiontag-exceptiontag": {"dfnID":"dom-exception-is-exceptiontag-exceptiontag","dfnText":"exceptionTag","external":false,"refSections":[],"url":"#dom-exception-is-exceptiontag-exceptiontag"},
"dom-exception-stack": {"dfnID":"dom-exception-stack","dfnText":"stack","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-exception-stack"}],"title":"4.7.2. Runtime exceptions"}],"url":"#dom-exception-stack"},
"dom-exceptionoptions-tracestack": {"dfnID":"dom-exceptionoptions-tracestack","dfnText":"traceStack","external":false,"refSections":[],"url":"#dom-exceptionoptions-tracestack"},
"dom-global-global": {"dfnID":"dom-global-global","dfnText":"Global(descriptor, v)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-global-global"}],"title":"4.5. Globals"}],"url":"#dom-global-global"},
"dom-global-global-descriptor-v-descriptor": {"dfnID":"dom-global-global-descriptor-v-descriptor","dfnText":"descriptor","external":false,"refSections":[],"url":"#dom-global-global-descriptor-v-descriptor"},
"dom-global-global-descriptor-v-v": {"dfnID":"dom-global-global-descriptor-v-v","dfnText":"v","external":false,"refSections":[],"url":"#dom-global-global-descriptor-v-v"},
"dom-global-value": {"dfnID":"dom-global-value","dfnText":"value","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-global-value"}],"title":"4.5. Globals"}],"url":"#dom-global-value"},
"dom-global-valueof": {"dfnID":"dom-global-valueof","dfnText":"valueOf()","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-global-valueof"}],"title":"4.5. Globals"}],"url":"#dom-global-valueof"},
"dom-globaldescriptor-mutable": {"dfnID":"dom-globaldescriptor-mutable","dfnText":"mutable","external":false,"refSections":[],"url":"#dom-globaldescriptor-mutable"},
"dom-globaldescriptor-value": {"dfnID":"dom-globaldescriptor-value","dfnText":"value","external":false,"refSections":[],"url":"#dom-globaldescriptor-value"},
"dom-importexportkind-function": {"dfnID":"dom-importexportkind-function","dfnText":"\"function\"","external":false,"refSections":[],"url":"#dom-importexportkind-function"},
"dom-importexportkind-global": {"dfnID":"dom-importexportkind-global","dfnText":"\"global\"","external":false,"refSections":[],"url":"#dom-importexportkind-global"},
"dom-importexportkind-memory": {"dfnID":"dom-importexportkind-memory","dfnText":"\"memory\"","external":false,"refSections":[],"url":"#dom-importexportkind-memory"},
"dom-importexportkind-table": {"dfnID":"dom-importexportkind-table","dfnText":"\"table\"","external":false,"refSections":[],"url":"#dom-importexportkind-table"},
"dom-importexportkind-tag": {"dfnID":"dom-importexportkind-tag","dfnText":"\"tag\"","external":false,"refSections":[],"url":"#dom-importexportkind-tag"},
"dom-instance-exports": {"dfnID":"dom-instance-exports","dfnText":"exports","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-instance-exports"}],"title":"4.2. Instances"}],"url":"#dom-instance-exports"},
"dom-instance-instance": {"dfnID":"dom-instance-instance","dfnText":"Instance(module, importObject)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-instance-instance"}],"title":"4.2. Instances"}],"url":"#dom-instance-instance"},
"dom-instance-instance-module-importobject-importobject": {"dfnID":"dom-instance-instance-module-importobject-importobject","dfnText":"importObject","external":false,"refSections":[],"url":"#dom-instance-instance-module-importobject-importobject"},
"dom-instance-instance-module-importobject-module": {"dfnID":"dom-instance-instance-module-importobject-module","dfnText":"module","external":false,"refSections":[],"url":"#dom-instance-instance-module-importobject-module"},
"dom-memory-buffer": {"dfnID":"dom-memory-buffer","dfnText":"buffer","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-memory-buffer"}],"title":"4.3. Memories"}],"url":"#dom-memory-buffer"},
"dom-memory-grow": {"dfnID":"dom-memory-grow","dfnText":"grow(delta)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-memory-grow"}],"title":"4.3. Memories"},{"refs":[{"id":"ref-for-dom-memory-grow\u2460"}],"title":"5.2. Out of Memory"}],"url":"#dom-memory-grow"},
"dom-memory-grow-delta-delta": {"dfnID":"dom-memory-grow-delta-delta","dfnText":"delta","external":false,"refSections":[],"url":"#dom-memory-grow-delta-delta"},
"dom-memory-memory": {"dfnID":"dom-memory-memory","dfnText":"Memory(descriptor)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-memory-memory"}],"title":"4.3. Memories"}],"url":"#dom-memory-memory"},
"dom-memory-memory-descriptor-descriptor": {"dfnID":"dom-memory-memory-descriptor-descriptor","dfnText":"descriptor","external":false,"refSections":[],"url":"#dom-memory-memory-descriptor-descriptor"},
"dom-memorydescriptor-initial": {"dfnID":"dom-memorydescriptor-initial","dfnText":"initial","external":false,"refSections":[],"url":"#dom-memorydescriptor-initial"},
"dom-memorydescriptor-maximum": {"dfnID":"dom-memorydescriptor-maximum","dfnText":"maximum","external":false,"refSections":[],"url":"#dom-memorydescriptor-maximum"},
"dom-module-customsections": {"dfnID":"dom-module-customsections","dfnText":"customSections(moduleObject, sectionName)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-module-customsections"}],"title":"4.1. Modules"}],"url":"#dom-module-customsections"},
"dom-module-customsections-moduleobject-sectionname-moduleobject": {"dfnID":"dom-module-customsections-moduleobject-sectionname-moduleobject","dfnText":"moduleObject","external":false,"refSections":[],"url":"#dom-module-customsections-moduleobject-sectionname-moduleobject"},
"dom-module-customsections-moduleobject-sectionname-sectionname": {"dfnID":"dom-module-customsections-moduleobject-sectionname-sectionname","dfnText":"sectionName","external":false,"refSections":[],"url":"#dom-module-customsections-moduleobject-sectionname-sectionname"},
"dom-module-exports": {"dfnID":"dom-module-exports","dfnText":"exports(moduleObject)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-module-exports"}],"title":"4.1. Modules"}],"url":"#dom-module-exports"},
"dom-module-exports-moduleobject-moduleobject": {"dfnID":"dom-module-exports-moduleobject-moduleobject","dfnText":"moduleObject","external":false,"refSections":[],"url":"#dom-module-exports-moduleobject-moduleobject"},
"dom-module-imports": {"dfnID":"dom-module-imports","dfnText":"imports(moduleObject)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-module-imports"}],"title":"4.1. Modules"}],"url":"#dom-module-imports"},
"dom-module-imports-moduleobject-moduleobject": {"dfnID":"dom-module-imports-moduleobject-moduleobject","dfnText":"moduleObject","external":false,"refSections":[],"url":"#dom-module-imports-moduleobject-moduleobject"},
"dom-module-module": {"dfnID":"dom-module-module","dfnText":"Module(bytes)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-module-module"}],"title":"4.1. Modules"}],"url":"#dom-module-module"},
"dom-module-module-bytes-bytes": {"dfnID":"dom-module-module-bytes-bytes","dfnText":"bytes","external":false,"refSections":[],"url":"#dom-module-module-bytes-bytes"},
"dom-moduleexportdescriptor-kind": {"dfnID":"dom-moduleexportdescriptor-kind","dfnText":"kind","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-moduleexportdescriptor-kind"}],"title":"4.1. Modules"}],"url":"#dom-moduleexportdescriptor-kind"},
"dom-moduleexportdescriptor-name": {"dfnID":"dom-moduleexportdescriptor-name","dfnText":"name","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-moduleexportdescriptor-name"}],"title":"4.1. Modules"}],"url":"#dom-moduleexportdescriptor-name"},
"dom-moduleimportdescriptor-kind": {"dfnID":"dom-moduleimportdescriptor-kind","dfnText":"kind","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-moduleimportdescriptor-kind"}],"title":"4.1. Modules"}],"url":"#dom-moduleimportdescriptor-kind"},
"dom-moduleimportdescriptor-module": {"dfnID":"dom-moduleimportdescriptor-module","dfnText":"module","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-moduleimportdescriptor-module"}],"title":"4.1. Modules"}],"url":"#dom-moduleimportdescriptor-module"},
"dom-moduleimportdescriptor-name": {"dfnID":"dom-moduleimportdescriptor-name","dfnText":"name","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-moduleimportdescriptor-name"}],"title":"4.1. Modules"}],"url":"#dom-moduleimportdescriptor-name"},
"dom-table-get": {"dfnID":"dom-table-get","dfnText":"get(index)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-table-get"}],"title":"4.4. Tables"}],"url":"#dom-table-get"},
"dom-table-get-index-index": {"dfnID":"dom-table-get-index-index","dfnText":"index","external":false,"refSections":[],"url":"#dom-table-get-index-index"},
"dom-table-grow": {"dfnID":"dom-table-grow","dfnText":"grow(delta, value)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-table-grow"}],"title":"4.4. Tables"},{"refs":[{"id":"ref-for-dom-table-grow\u2460"}],"title":"5.2. Out of Memory"}],"url":"#dom-table-grow"},
"dom-table-grow-delta-value-delta": {"dfnID":"dom-table-grow-delta-value-delta","dfnText":"delta","external":false,"refSections":[],"url":"#dom-table-grow-delta-value-delta"},
"dom-table-grow-delta-value-value": {"dfnID":"dom-table-grow-delta-value-value","dfnText":"value","external":false,"refSections":[],"url":"#dom-table-grow-delta-value-value"},
"dom-table-length": {"dfnID":"dom-table-length","dfnText":"length","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-table-length"}],"title":"4.4. Tables"}],"url":"#dom-table-length"},
"dom-table-set": {"dfnID":"dom-table-set","dfnText":"set(index, value)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-table-set"}],"title":"4.4. Tables"}],"url":"#dom-table-set"},
"dom-table-set-index-value-index": {"dfnID":"dom-table-set-index-value-index","dfnText":"index","external":false,"refSections":[],"url":"#dom-table-set-index-value-index"},
"dom-table-set-index-value-value": {"dfnID":"dom-table-set-index-value-value","dfnText":"value","external":false,"refSections":[],"url":"#dom-table-set-index-value-value"},
"dom-table-table": {"dfnID":"dom-table-table","dfnText":"Table(descriptor, value)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-table-table"}],"title":"4.4. Tables"}],"url":"#dom-table-table"},
"dom-table-table-descriptor-value-descriptor": {"dfnID":"dom-table-table-descriptor-value-descriptor","dfnText":"descriptor","external":false,"refSections":[],"url":"#dom-table-table-descriptor-value-descriptor"},
"dom-table-table-descriptor-value-value": {"dfnID":"dom-table-table-descriptor-value-value","dfnText":"value","external":false,"refSections":[],"url":"#dom-table-table-descriptor-value-value"},
"dom-tabledescriptor-element": {"dfnID":"dom-tabledescriptor-element","dfnText":"element","external":false,"refSections":[],"url":"#dom-tabledescriptor-element"},
"dom-tabledescriptor-initial": {"dfnID":"dom-tabledescriptor-initial","dfnText":"initial","external":false,"refSections":[],"url":"#dom-tabledescriptor-initial"},
"dom-tabledescriptor-maximum": {"dfnID":"dom-tabledescriptor-maximum","dfnText":"maximum","external":false,"refSections":[],"url":"#dom-tabledescriptor-maximum"},
"dom-tablekind-anyfunc": {"dfnID":"dom-tablekind-anyfunc","dfnText":"\"anyfunc\"","external":false,"refSections":[],"url":"#dom-tablekind-anyfunc"},
"dom-tablekind-externref": {"dfnID":"dom-tablekind-externref","dfnText":"\"externref\"","external":false,"refSections":[],"url":"#dom-tablekind-externref"},
"dom-tag-tag": {"dfnID":"dom-tag-tag","dfnText":"new Tag(type)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-tag-tag"}],"title":"4.7.1. Exception types"}],"url":"#dom-tag-tag"},
"dom-tag-tag-type-type": {"dfnID":"dom-tag-tag-type-type","dfnText":"type","external":false,"refSections":[],"url":"#dom-tag-tag-type-type"},
"dom-tag-type": {"dfnID":"dom-tag-type","dfnText":"type()","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-tag-type"}],"title":"4.7.1. Exception types"}],"url":"#dom-tag-type"},
"dom-tagtype-parameters": {"dfnID":"dom-tagtype-parameters","dfnText":"parameters","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-tagtype-parameters"}],"title":"4.7.1. Exception types"}],"url":"#dom-tagtype-parameters"},
"dom-valuetype-anyfunc": {"dfnID":"dom-valuetype-anyfunc","dfnText":"\"anyfunc\"","external":false,"refSections":[],"url":"#dom-valuetype-anyfunc"},
"dom-valuetype-externref": {"dfnID":"dom-valuetype-externref","dfnText":"\"externref\"","external":false,"refSections":[],"url":"#dom-valuetype-externref"},
"dom-valuetype-f32": {"dfnID":"dom-valuetype-f32","dfnText":"\"f32\"","external":false,"refSections":[],"url":"#dom-valuetype-f32"},
"dom-valuetype-f64": {"dfnID":"dom-valuetype-f64","dfnText":"\"f64\"","external":false,"refSections":[],"url":"#dom-valuetype-f64"},
"dom-valuetype-i32": {"dfnID":"dom-valuetype-i32","dfnText":"\"i32\"","external":false,"refSections":[],"url":"#dom-valuetype-i32"},
"dom-valuetype-i64": {"dfnID":"dom-valuetype-i64","dfnText":"\"i64\"","external":false,"refSections":[],"url":"#dom-valuetype-i64"},
"dom-valuetype-v128": {"dfnID":"dom-valuetype-v128","dfnText":"\"v128\"","external":false,"refSections":[],"url":"#dom-valuetype-v128"},
"dom-webassembly-compile": {"dfnID":"dom-webassembly-compile","dfnText":"compile(bytes)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-webassembly-compile"}],"title":"4. The WebAssembly Namespace"}],"url":"#dom-webassembly-compile"},
"dom-webassembly-compile-bytes-bytes": {"dfnID":"dom-webassembly-compile-bytes-bytes","dfnText":"bytes","external":false,"refSections":[],"url":"#dom-webassembly-compile-bytes-bytes"},
"dom-webassembly-instantiate": {"dfnID":"dom-webassembly-instantiate","dfnText":"instantiate(bytes, importObject)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-webassembly-instantiate"}],"title":"4. The WebAssembly Namespace"}],"url":"#dom-webassembly-instantiate"},
"dom-webassembly-instantiate-bytes-importobject-bytes": {"dfnID":"dom-webassembly-instantiate-bytes-importobject-bytes","dfnText":"bytes","external":false,"refSections":[],"url":"#dom-webassembly-instantiate-bytes-importobject-bytes"},
"dom-webassembly-instantiate-bytes-importobject-importobject": {"dfnID":"dom-webassembly-instantiate-bytes-importobject-importobject","dfnText":"importObject","external":false,"refSections":[],"url":"#dom-webassembly-instantiate-bytes-importobject-importobject"},
"dom-webassembly-instantiate-moduleobject-importobject": {"dfnID":"dom-webassembly-instantiate-moduleobject-importobject","dfnText":"instantiate(moduleObject, importObject)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-webassembly-instantiate-moduleobject-importobject"}],"title":"4. The WebAssembly Namespace"}],"url":"#dom-webassembly-instantiate-moduleobject-importobject"},
"dom-webassembly-instantiate-moduleobject-importobject-importobject": {"dfnID":"dom-webassembly-instantiate-moduleobject-importobject-importobject","dfnText":"importObject","external":false,"refSections":[],"url":"#dom-webassembly-instantiate-moduleobject-importobject-importobject"},
"dom-webassembly-instantiate-moduleobject-importobject-moduleobject": {"dfnID":"dom-webassembly-instantiate-moduleobject-importobject-moduleobject","dfnText":"moduleObject","external":false,"refSections":[],"url":"#dom-webassembly-instantiate-moduleobject-importobject-moduleobject"},
"dom-webassembly-validate": {"dfnID":"dom-webassembly-validate","dfnText":"validate(bytes)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-webassembly-validate"}],"title":"4. The WebAssembly Namespace"}],"url":"#dom-webassembly-validate"},
"dom-webassembly-validate-bytes-bytes": {"dfnID":"dom-webassembly-validate-bytes-bytes","dfnText":"bytes","external":false,"refSections":[],"url":"#dom-webassembly-validate-bytes-bytes"},
"dom-webassemblyinstantiatedsource-instance": {"dfnID":"dom-webassemblyinstantiatedsource-instance","dfnText":"instance","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-webassemblyinstantiatedsource-instance"}],"title":"4. The WebAssembly Namespace"}],"url":"#dom-webassemblyinstantiatedsource-instance"},
"dom-webassemblyinstantiatedsource-module": {"dfnID":"dom-webassemblyinstantiatedsource-module","dfnText":"module","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-webassemblyinstantiatedsource-module"}],"title":"4. The WebAssembly Namespace"}],"url":"#dom-webassemblyinstantiatedsource-module"},
"e2fb14e5": {"dfnID":"e2fb14e5","dfnText":"NumericToRawBytes","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-numerictorawbytes"}],"title":"4.6. Exported Functions"}],"url":"https://tc39.es/ecma262/multipage/structured-data.html#sec-numerictorawbytes"},
"e8d18dfd": {"dfnID":"e8d18dfd","dfnText":"extern address","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-externaddr"}],"title":"3.2. WebAssembly JS Object Caches"},{"refs":[{"id":"ref-for-syntax-externaddr\u2460"},{"id":"ref-for-syntax-externaddr\u2461"},{"id":"ref-for-syntax-externaddr\u2462"}],"title":"4.6. Exported Functions"}],"url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externaddr"},
"e8f0aed3": {"dfnID":"e8f0aed3","dfnText":"Built-in Function Objects","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-built-in-function-objects"},{"id":"ref-for-sec-built-in-function-objects\u2460"}],"title":"4.6. Exported Functions"}],"url":"https://tc39.github.io/ecma262/#sec-built-in-function-objects"},
"e97a9688": {"dfnID":"e97a9688","dfnText":"unsigned long","external":true,"refSections":[{"refs":[{"id":"ref-for-idl-unsigned-long"},{"id":"ref-for-idl-unsigned-long\u2460"},{"id":"ref-for-idl-unsigned-long\u2461"},{"id":"ref-for-idl-unsigned-long\u2462"}],"title":"4.3. Memories"},{"refs":[{"id":"ref-for-idl-unsigned-long\u2463"},{"id":"ref-for-idl-unsigned-long\u2464"},{"id":"ref-for-idl-unsigned-long\u2465"},{"id":"ref-for-idl-unsigned-long\u2466"},{"id":"ref-for-idl-unsigned-long\u2467"},{"id":"ref-for-idl-unsigned-long\u2468"},{"id":"ref-for-idl-unsigned-long\u2460\u24ea"}],"title":"4.4. Tables"},{"refs":[{"id":"ref-for-idl-unsigned-long\u2460\u2460"}],"title":"4.7.2. Runtime exceptions"}],"url":"https://webidl.spec.whatwg.org/#idl-unsigned-long"},
"ebb4ace3": {"dfnID":"ebb4ace3","dfnText":"?","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-returnifabrupt-shorthands"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2460"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2461"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2462"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2463"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-sec-returnifabrupt-shorthands\u2464"}],"title":"4.3. Memories"},{"refs":[{"id":"ref-for-sec-returnifabrupt-shorthands\u2465"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2466"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2467"}],"title":"4.4. Tables"},{"refs":[{"id":"ref-for-sec-returnifabrupt-shorthands\u2468"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2460\u24ea"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2460\u2460"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2460\u2461"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2460\u2462"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2460\u2463"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2460\u2464"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2460\u2465"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2460\u2466"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2460\u2467"},{"id":"ref-for-sec-returnifabrupt-shorthands\u2460\u2468"}],"title":"4.6. Exported Functions"},{"refs":[{"id":"ref-for-sec-returnifabrupt-shorthands\u2461\u24ea"}],"title":"4.8. Error Objects"}],"url":"https://tc39.github.io/ecma262/#sec-returnifabrupt-shorthands"},
"ebbbef34": {"dfnID":"ebbbef34","dfnText":"OrdinaryObjectCreate","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-ordinaryobjectcreate"}],"title":"4. The WebAssembly Namespace"}],"url":"https://tc39.es/ecma262/multipage/ordinary-and-exotic-objects-behaviours.html#sec-ordinaryobjectcreate"},
"ec6fe07e": {"dfnID":"ec6fe07e","dfnText":"sequence","external":true,"refSections":[{"refs":[{"id":"ref-for-grammar-notation"}],"title":"2. Notation"}],"url":"https://webassembly.github.io/exception-handling/core/syntax/conventions.html#grammar-notation"},
"eca66c99": {"dfnID":"eca66c99","dfnText":"Data Block","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-data-blocks"}],"title":"3.1. Interaction of the WebAssembly Store with JavaScript"},{"refs":[{"id":"ref-for-sec-data-blocks\u2460"},{"id":"ref-for-sec-data-blocks\u2461"}],"title":"4.3. Memories"}],"url":"https://tc39.es/ecma262/multipage/ecmascript-data-types-and-values.html#sec-data-blocks"},
"efd1ec5d": {"dfnID":"efd1ec5d","dfnText":"object","external":true,"refSections":[{"refs":[{"id":"ref-for-idl-object"},{"id":"ref-for-idl-object\u2460"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-idl-object\u2461"},{"id":"ref-for-idl-object\u2462"}],"title":"4.2. Instances"}],"url":"https://webidl.spec.whatwg.org/#idl-object"},
"enumdef-importexportkind": {"dfnID":"enumdef-importexportkind","dfnText":"ImportExportKind","external":false,"refSections":[{"refs":[{"id":"ref-for-enumdef-importexportkind"},{"id":"ref-for-enumdef-importexportkind\u2460"}],"title":"4.1. Modules"}],"url":"#enumdef-importexportkind"},
"enumdef-tablekind": {"dfnID":"enumdef-tablekind","dfnText":"TableKind","external":false,"refSections":[{"refs":[{"id":"ref-for-enumdef-tablekind"}],"title":"4.4. Tables"}],"url":"#enumdef-tablekind"},
"enumdef-valuetype": {"dfnID":"enumdef-valuetype","dfnText":"ValueType","external":false,"refSections":[{"refs":[{"id":"ref-for-enumdef-valuetype"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-enumdef-valuetype\u2460"}],"title":"4.7.1. Exception types"}],"url":"#enumdef-valuetype"},
"exception": {"dfnID":"exception","dfnText":"Exception","external":false,"refSections":[{"refs":[{"id":"ref-for-exception"}],"title":"4.6. Exported Functions"},{"refs":[{"id":"ref-for-exception\u2460"},{"id":"ref-for-exception\u2461"}],"title":"4.7.2. Runtime exceptions"}],"url":"#exception"},
"exceptiondef-compileerror": {"dfnID":"exceptiondef-compileerror","dfnText":"CompileError","external":false,"refSections":[{"refs":[{"id":"ref-for-exceptiondef-compileerror"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-exceptiondef-compileerror\u2460"}],"title":"4.1. Modules"},{"refs":[{"id":"ref-for-exceptiondef-compileerror\u2461"}],"title":"4.8. Error Objects"},{"refs":[{"id":"ref-for-exceptiondef-compileerror\u2462"}],"title":"6. Implementation-defined Limits"}],"url":"#exceptiondef-compileerror"},
"exceptiondef-linkerror": {"dfnID":"exceptiondef-linkerror","dfnText":"LinkError","external":false,"refSections":[{"refs":[{"id":"ref-for-exceptiondef-linkerror"},{"id":"ref-for-exceptiondef-linkerror\u2460"},{"id":"ref-for-exceptiondef-linkerror\u2461"},{"id":"ref-for-exceptiondef-linkerror\u2462"},{"id":"ref-for-exceptiondef-linkerror\u2463"},{"id":"ref-for-exceptiondef-linkerror\u2464"},{"id":"ref-for-exceptiondef-linkerror\u2465"},{"id":"ref-for-exceptiondef-linkerror\u2466"},{"id":"ref-for-exceptiondef-linkerror\u2467"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-exceptiondef-linkerror\u2468"}],"title":"4.8. Error Objects"}],"url":"#exceptiondef-linkerror"},
"exceptiondef-runtimeerror": {"dfnID":"exceptiondef-runtimeerror","dfnText":"RuntimeError","external":false,"refSections":[{"refs":[{"id":"ref-for-exceptiondef-runtimeerror"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-exceptiondef-runtimeerror\u2460"}],"title":"4.6. Exported Functions"},{"refs":[{"id":"ref-for-exceptiondef-runtimeerror\u2461"}],"title":"4.8. Error Objects"},{"refs":[{"id":"ref-for-exceptiondef-runtimeerror\u2462"}],"title":"6. Implementation-defined Limits"}],"url":"#exceptiondef-runtimeerror"},
"exported-function": {"dfnID":"exported-function","dfnText":"Exported Function","external":false,"refSections":[{"refs":[{"id":"ref-for-exported-function"}],"title":"3.2. WebAssembly JS Object Caches"},{"refs":[{"id":"ref-for-exported-function\u2460"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-exported-function\u2461"}],"title":"4.6. Exported Functions"}],"url":"#exported-function"},
"exported-function-cache": {"dfnID":"exported-function-cache","dfnText":"Exported Function cache","external":false,"refSections":[{"refs":[{"id":"ref-for-exported-function-cache"}],"title":"4.6. Exported Functions"}],"url":"#exported-function-cache"},
"extern-value-cache": {"dfnID":"extern-value-cache","dfnText":"Extern value cache","external":false,"refSections":[{"refs":[{"id":"ref-for-extern-value-cache"},{"id":"ref-for-extern-value-cache\u2460"}],"title":"4.6. Exported Functions"}],"url":"#extern-value-cache"},
"f02cd417": {"dfnID":"f02cd417","dfnText":"iterate","external":true,"refSections":[{"refs":[{"id":"ref-for-list-iterate"},{"id":"ref-for-list-iterate\u2460"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-list-iterate\u2461"},{"id":"ref-for-list-iterate\u2462"},{"id":"ref-for-list-iterate\u2463"}],"title":"4.1. Modules"},{"refs":[{"id":"ref-for-list-iterate\u2464"},{"id":"ref-for-list-iterate\u2465"},{"id":"ref-for-list-iterate\u2466"}],"title":"4.6. Exported Functions"},{"refs":[{"id":"ref-for-list-iterate\u2467"},{"id":"ref-for-list-iterate\u2468"}],"title":"4.7.1. Exception types"},{"refs":[{"id":"ref-for-list-iterate\u2460\u24ea"},{"id":"ref-for-list-iterate\u2460\u2460"}],"title":"4.7.2. Runtime exceptions"},{"refs":[{"id":"ref-for-list-iterate\u2460\u2461"}],"title":"4.8. Error Objects"}],"url":"https://infra.spec.whatwg.org/#list-iterate"},
"f14ed351": {"dfnID":"f14ed351","dfnText":"upon rejection","external":true,"refSections":[{"refs":[{"id":"ref-for-upon-rejection"},{"id":"ref-for-upon-rejection\u2460"}],"title":"4. The WebAssembly Namespace"}],"url":"https://webidl.spec.whatwg.org/#upon-rejection"},
"f17862f0": {"dfnID":"f17862f0","dfnText":"ArrayBuffer","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-arraybuffer-objects"},{"id":"ref-for-sec-arraybuffer-objects\u2460"}],"title":"4.1. Modules"},{"refs":[{"id":"ref-for-sec-arraybuffer-objects\u2461"},{"id":"ref-for-sec-arraybuffer-objects\u2462"},{"id":"ref-for-sec-arraybuffer-objects\u2463"}],"title":"4.3. Memories"}],"url":"https://tc39.github.io/ecma262/#sec-arraybuffer-objects"},
"f256859a": {"dfnID":"f256859a","dfnText":"UTF-8 decode without BOM or fail","external":true,"refSections":[{"refs":[{"id":"ref-for-utf-8-decode-without-bom-or-fail"}],"title":"4.1. Modules"}],"url":"https://encoding.spec.whatwg.org/#utf-8-decode-without-bom-or-fail"},
"f828fc68": {"dfnID":"f828fc68","dfnText":"memory address","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-memaddr"}],"title":"3.2. WebAssembly JS Object Caches"},{"refs":[{"id":"ref-for-syntax-memaddr\u2460"},{"id":"ref-for-syntax-memaddr\u2461"},{"id":"ref-for-syntax-memaddr\u2462"},{"id":"ref-for-syntax-memaddr\u2463"}],"title":"4.3. Memories"}],"url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-memaddr"},
"f98ab0c2": {"dfnID":"f98ab0c2","dfnText":"LegacyNamespace","external":true,"refSections":[{"refs":[{"id":"ref-for-LegacyNamespace"}],"title":"4.1. Modules"},{"refs":[{"id":"ref-for-LegacyNamespace\u2460"}],"title":"4.2. Instances"},{"refs":[{"id":"ref-for-LegacyNamespace\u2461"}],"title":"4.3. Memories"},{"refs":[{"id":"ref-for-LegacyNamespace\u2462"}],"title":"4.4. Tables"},{"refs":[{"id":"ref-for-LegacyNamespace\u2463"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-LegacyNamespace\u2464"}],"title":"4.7.1. Exception types"},{"refs":[{"id":"ref-for-LegacyNamespace\u2465"}],"title":"4.7.2. Runtime exceptions"}],"url":"https://webidl.spec.whatwg.org/#LegacyNamespace"},
"f9dbc1a8": {"dfnID":"f9dbc1a8","dfnText":"NativeError Object Structure","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-nativeerror-object-structure"}],"title":"4.8. Error Objects"}],"url":"https://tc39.github.io/ecma262/#sec-nativeerror-object-structure"},
"fa5c4242": {"dfnID":"fa5c4242","dfnText":"agent cluster","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-agent-clusters"}],"title":"3.1. Interaction of the WebAssembly Store with JavaScript"}],"url":"https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#sec-agent-clusters"},
"fe361a62": {"dfnID":"fe361a62","dfnText":"tag address","external":true,"refSections":[{"refs":[{"id":"ref-for-syntax-tagaddr"}],"title":"3.2. WebAssembly JS Object Caches"},{"refs":[{"id":"ref-for-syntax-tagaddr\u2460"},{"id":"ref-for-syntax-tagaddr\u2461"}],"title":"4.7. Tags"},{"refs":[{"id":"ref-for-syntax-tagaddr\u2462"},{"id":"ref-for-syntax-tagaddr\u2463"}],"title":"4.7.1. Exception types"},{"refs":[{"id":"ref-for-syntax-tagaddr\u2464"}],"title":"4.7.2. Runtime exceptions"},{"refs":[{"id":"ref-for-syntax-tagaddr\u2465"},{"id":"ref-for-syntax-tagaddr\u2466"}],"title":"4.7.3. JavaScript exceptions"}],"url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-tagaddr"},
"ff7a2887": {"dfnID":"ff7a2887","dfnText":"instance_export","external":true,"refSections":[{"refs":[{"id":"ref-for-embed-instance-export"}],"title":"4. The WebAssembly Namespace"}],"url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-instance-export"},
"getglobalvalue": {"dfnID":"getglobalvalue","dfnText":"GetGlobalValue","external":false,"refSections":[{"refs":[{"id":"ref-for-getglobalvalue"},{"id":"ref-for-getglobalvalue\u2460"}],"title":"4.5. Globals"}],"url":"#getglobalvalue"},
"global": {"dfnID":"global","dfnText":"Global","external":false,"refSections":[{"refs":[{"id":"ref-for-global"}],"title":"3.2. WebAssembly JS Object Caches"},{"refs":[{"id":"ref-for-global\u2460"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-global\u2461"},{"id":"ref-for-global\u2462"},{"id":"ref-for-global\u2463"},{"id":"ref-for-global\u2464"},{"id":"ref-for-global\u2465"},{"id":"ref-for-global\u2466"}],"title":"4.5. Globals"}],"url":"#global"},
"global-object-cache": {"dfnID":"global-object-cache","dfnText":"Global object cache","external":false,"refSections":[{"refs":[{"id":"ref-for-global-object-cache"},{"id":"ref-for-global-object-cache\u2460"}],"title":"4.5. Globals"}],"url":"#global-object-cache"},
"identified-with": {"dfnID":"identified-with","dfnText":"identified with","external":false,"refSections":[{"refs":[{"id":"ref-for-identified-with"},{"id":"ref-for-identified-with\u2460"}],"title":"4.3. Memories"}],"url":"#identified-with"},
"index-of-the-host-function": {"dfnID":"index-of-the-host-function","dfnText":"index of the host function","external":false,"refSections":[{"refs":[{"id":"ref-for-index-of-the-host-function"}],"title":"4.6. Exported Functions"}],"url":"#index-of-the-host-function"},
"initialize-a-global-object": {"dfnID":"initialize-a-global-object","dfnText":"initialize a global object","external":false,"refSections":[{"refs":[{"id":"ref-for-initialize-a-global-object"},{"id":"ref-for-initialize-a-global-object\u2460"}],"title":"4.5. Globals"}],"url":"#initialize-a-global-object"},
"initialize-a-memory-object": {"dfnID":"initialize-a-memory-object","dfnText":"initialize a memory object","external":false,"refSections":[{"refs":[{"id":"ref-for-initialize-a-memory-object"},{"id":"ref-for-initialize-a-memory-object\u2460"}],"title":"4.3. Memories"}],"url":"#initialize-a-memory-object"},
"initialize-a-table-object": {"dfnID":"initialize-a-table-object","dfnText":"initialize a table object","external":false,"refSections":[{"refs":[{"id":"ref-for-initialize-a-table-object"},{"id":"ref-for-initialize-a-table-object\u2460"}],"title":"4.4. Tables"}],"url":"#initialize-a-table-object"},
"initialize-a-tag-object": {"dfnID":"initialize-a-tag-object","dfnText":"initialize a Tag object","external":false,"refSections":[{"refs":[{"id":"ref-for-initialize-a-tag-object"},{"id":"ref-for-initialize-a-tag-object\u2460"}],"title":"4.7.1. Exception types"}],"url":"#initialize-a-tag-object"},
"initialize-an-instance-object": {"dfnID":"initialize-an-instance-object","dfnText":"initialize an instance object","external":false,"refSections":[{"refs":[{"id":"ref-for-initialize-an-instance-object"},{"id":"ref-for-initialize-an-instance-object\u2460"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-initialize-an-instance-object\u2461"}],"title":"4.2. Instances"}],"url":"#initialize-an-instance-object"},
"instance": {"dfnID":"instance","dfnText":"Instance","external":false,"refSections":[{"refs":[{"id":"ref-for-instance"},{"id":"ref-for-instance\u2460"},{"id":"ref-for-instance\u2461"},{"id":"ref-for-instance\u2462"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-instance\u2463"}],"title":"4.2. Instances"},{"refs":[{"id":"ref-for-instance\u2464"}],"title":"4.3. Memories"},{"refs":[{"id":"ref-for-instance\u2465"}],"title":"4.4. Tables"},{"refs":[{"id":"ref-for-instance\u2466"}],"title":"4.5. Globals"}],"url":"#instance"},
"instantiate-a-promise-of-a-module": {"dfnID":"instantiate-a-promise-of-a-module","dfnText":"instantiate a promise of a module","external":false,"refSections":[{"refs":[{"id":"ref-for-instantiate-a-promise-of-a-module"}],"title":"4. The WebAssembly Namespace"}],"url":"#instantiate-a-promise-of-a-module"},
"instantiate-the-core-of-a-webassembly-module": {"dfnID":"instantiate-the-core-of-a-webassembly-module","dfnText":"instantiate the core of a WebAssembly module","external":false,"refSections":[{"refs":[{"id":"ref-for-instantiate-the-core-of-a-webassembly-module"},{"id":"ref-for-instantiate-the-core-of-a-webassembly-module\u2460"},{"id":"ref-for-instantiate-the-core-of-a-webassembly-module\u2461"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-instantiate-the-core-of-a-webassembly-module\u2462"}],"title":"4.2. Instances"}],"url":"#instantiate-the-core-of-a-webassembly-module"},
"javascript-exception-tag": {"dfnID":"javascript-exception-tag","dfnText":"JavaScript exception tag","external":false,"refSections":[{"refs":[{"id":"ref-for-javascript-exception-tag"}],"title":"4.6. Exported Functions"},{"refs":[{"id":"ref-for-javascript-exception-tag\u2460"}],"title":"4.7.3. JavaScript exceptions"}],"url":"#javascript-exception-tag"},
"memory": {"dfnID":"memory","dfnText":"Memory","external":false,"refSections":[{"refs":[{"id":"ref-for-memory"}],"title":"3.1. Interaction of the WebAssembly Store with JavaScript"},{"refs":[{"id":"ref-for-memory\u2460"}],"title":"3.2. WebAssembly JS Object Caches"},{"refs":[{"id":"ref-for-memory\u2461"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-memory\u2462"},{"id":"ref-for-memory\u2463"},{"id":"ref-for-memory\u2464"},{"id":"ref-for-memory\u2465"}],"title":"4.3. Memories"},{"refs":[{"id":"ref-for-memory\u2466"}],"title":"5.2. Out of Memory"}],"url":"#memory"},
"memory-object-cache": {"dfnID":"memory-object-cache","dfnText":"Memory object cache","external":false,"refSections":[{"refs":[{"id":"ref-for-memory-object-cache"},{"id":"ref-for-memory-object-cache\u2460"},{"id":"ref-for-memory-object-cache\u2461"}],"title":"4.3. Memories"}],"url":"#memory-object-cache"},
"module": {"dfnID":"module","dfnText":"Module","external":false,"refSections":[{"refs":[{"id":"ref-for-module"},{"id":"ref-for-module\u2460"},{"id":"ref-for-module\u2461"},{"id":"ref-for-module\u2462"},{"id":"ref-for-module\u2463"},{"id":"ref-for-module\u2464"},{"id":"ref-for-module\u2465"},{"id":"ref-for-module\u2466"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-module\u2467"},{"id":"ref-for-module\u2468"},{"id":"ref-for-module\u2460\u24ea"}],"title":"4.1. Modules"},{"refs":[{"id":"ref-for-module\u2460\u2460"}],"title":"4.2. Instances"}],"url":"#module"},
"name-of-the-webassembly-function": {"dfnID":"name-of-the-webassembly-function","dfnText":"name of the WebAssembly function","external":false,"refSections":[{"refs":[{"id":"ref-for-name-of-the-webassembly-function"}],"title":"4.6. Exported Functions"}],"url":"#name-of-the-webassembly-function"},
"namespacedef-webassembly": {"dfnID":"namespacedef-webassembly","dfnText":"WebAssembly","external":false,"refSections":[{"refs":[{"id":"ref-for-namespacedef-webassembly"}],"title":"4.1. Modules"},{"refs":[{"id":"ref-for-namespacedef-webassembly\u2460"}],"title":"4.2. Instances"},{"refs":[{"id":"ref-for-namespacedef-webassembly\u2461"}],"title":"4.3. Memories"},{"refs":[{"id":"ref-for-namespacedef-webassembly\u2462"}],"title":"4.4. Tables"},{"refs":[{"id":"ref-for-namespacedef-webassembly\u2463"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-namespacedef-webassembly\u2464"}],"title":"4.7.1. Exception types"},{"refs":[{"id":"ref-for-namespacedef-webassembly\u2465"}],"title":"4.7.2. Runtime exceptions"},{"refs":[{"id":"ref-for-namespacedef-webassembly\u2466"},{"id":"ref-for-namespacedef-webassembly\u2467"}],"title":"4.8. Error Objects"}],"url":"#namespacedef-webassembly"},
"read-the-imports": {"dfnID":"read-the-imports","dfnText":"read the imports","external":false,"refSections":[{"refs":[{"id":"ref-for-read-the-imports"},{"id":"ref-for-read-the-imports\u2460"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-read-the-imports\u2461"}],"title":"4.2. Instances"},{"refs":[{"id":"ref-for-read-the-imports\u2462"}],"title":"7. Security and Privacy Considerations"}],"url":"#read-the-imports"},
"reset-the-memory-buffer": {"dfnID":"reset-the-memory-buffer","dfnText":"reset the Memory buffer","external":false,"refSections":[{"refs":[{"id":"ref-for-reset-the-memory-buffer"},{"id":"ref-for-reset-the-memory-buffer\u2460"}],"title":"4.3. Memories"}],"url":"#reset-the-memory-buffer"},
"retrieving-an-extern-value": {"dfnID":"retrieving-an-extern-value","dfnText":"retrieving an extern value","external":false,"refSections":[{"refs":[{"id":"ref-for-retrieving-an-extern-value"},{"id":"ref-for-retrieving-an-extern-value\u2460"}],"title":"4.6. Exported Functions"}],"url":"#retrieving-an-extern-value"},
"run-a-host-function": {"dfnID":"run-a-host-function","dfnText":"run a host function","external":false,"refSections":[{"refs":[{"id":"ref-for-run-a-host-function"}],"title":"4.6. Exported Functions"}],"url":"#run-a-host-function"},
"string-value-of-the-extern-type": {"dfnID":"string-value-of-the-extern-type","dfnText":"string value of the extern type","external":false,"refSections":[{"refs":[{"id":"ref-for-string-value-of-the-extern-type"},{"id":"ref-for-string-value-of-the-extern-type\u2460"}],"title":"4.1. Modules"}],"url":"#string-value-of-the-extern-type"},
"synchronously-instantiate-a-webassembly-module": {"dfnID":"synchronously-instantiate-a-webassembly-module","dfnText":"synchronously instantiate a WebAssembly module","external":false,"refSections":[],"url":"#synchronously-instantiate-a-webassembly-module"},
"table": {"dfnID":"table","dfnText":"Table","external":false,"refSections":[{"refs":[{"id":"ref-for-table"}],"title":"3.2. WebAssembly JS Object Caches"},{"refs":[{"id":"ref-for-table\u2460"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-table\u2461"},{"id":"ref-for-table\u2462"},{"id":"ref-for-table\u2463"},{"id":"ref-for-table\u2464"}],"title":"4.4. Tables"},{"refs":[{"id":"ref-for-table\u2465"}],"title":"5.2. Out of Memory"}],"url":"#table"},
"table-object-cache": {"dfnID":"table-object-cache","dfnText":"Table object cache","external":false,"refSections":[{"refs":[{"id":"ref-for-table-object-cache"},{"id":"ref-for-table-object-cache\u2460"}],"title":"4.4. Tables"}],"url":"#table-object-cache"},
"tag": {"dfnID":"tag","dfnText":"Tag","external":false,"refSections":[{"refs":[{"id":"ref-for-tag"}],"title":"3.2. WebAssembly JS Object Caches"},{"refs":[{"id":"ref-for-tag\u2460"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-tag\u2461"},{"id":"ref-for-tag\u2462"}],"title":"4.7.1. Exception types"},{"refs":[{"id":"ref-for-tag\u2463"},{"id":"ref-for-tag\u2464"},{"id":"ref-for-tag\u2465"}],"title":"4.7.2. Runtime exceptions"}],"url":"#tag"},
"tag-object-cache": {"dfnID":"tag-object-cache","dfnText":"Tag object cache","external":false,"refSections":[{"refs":[{"id":"ref-for-tag-object-cache"},{"id":"ref-for-tag-object-cache\u2460"}],"title":"4.7.1. Exception types"}],"url":"#tag-object-cache"},
"tag_alloc": {"dfnID":"tag_alloc","dfnText":"tag_alloc","external":false,"refSections":[{"refs":[{"id":"ref-for-tag_alloc"}],"title":"4.7.1. Exception types"}],"url":"#tag_alloc"},
"tag_parameters": {"dfnID":"tag_parameters","dfnText":"tag_parameters","external":false,"refSections":[{"refs":[{"id":"ref-for-tag_parameters"}],"title":"4.7.1. Exception types"},{"refs":[{"id":"ref-for-tag_parameters\u2460"},{"id":"ref-for-tag_parameters\u2461"}],"title":"4.7.2. Runtime exceptions"},{"refs":[{"id":"ref-for-tag_parameters\u2462"}],"title":"4.7.3. JavaScript exceptions"}],"url":"#tag_parameters"},
"tojsvalue": {"dfnID":"tojsvalue","dfnText":"ToJSValue","external":false,"refSections":[{"refs":[{"id":"ref-for-tojsvalue"}],"title":"4.4. Tables"},{"refs":[{"id":"ref-for-tojsvalue\u2460"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-tojsvalue\u2461"},{"id":"ref-for-tojsvalue\u2462"},{"id":"ref-for-tojsvalue\u2463"}],"title":"4.6. Exported Functions"},{"refs":[{"id":"ref-for-tojsvalue\u2464"}],"title":"4.7.2. Runtime exceptions"}],"url":"#tojsvalue"},
"tovaluetype": {"dfnID":"tovaluetype","dfnText":"ToValueType","external":false,"refSections":[{"refs":[{"id":"ref-for-tovaluetype"}],"title":"4.4. Tables"},{"refs":[{"id":"ref-for-tovaluetype\u2460"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-tovaluetype\u2461"}],"title":"4.7.1. Exception types"}],"url":"#tovaluetype"},
"towebassemblyvalue": {"dfnID":"towebassemblyvalue","dfnText":"ToWebAssemblyValue","external":false,"refSections":[{"refs":[{"id":"ref-for-towebassemblyvalue"}],"title":"4. The WebAssembly Namespace"},{"refs":[{"id":"ref-for-towebassemblyvalue\u2460"},{"id":"ref-for-towebassemblyvalue\u2461"},{"id":"ref-for-towebassemblyvalue\u2462"}],"title":"4.4. Tables"},{"refs":[{"id":"ref-for-towebassemblyvalue\u2463"},{"id":"ref-for-towebassemblyvalue\u2464"},{"id":"ref-for-towebassemblyvalue\u2465"}],"title":"4.5. Globals"},{"refs":[{"id":"ref-for-towebassemblyvalue\u2466"},{"id":"ref-for-towebassemblyvalue\u2467"},{"id":"ref-for-towebassemblyvalue\u2468"},{"id":"ref-for-towebassemblyvalue\u2460\u24ea"}],"title":"4.6. Exported Functions"},{"refs":[{"id":"ref-for-towebassemblyvalue\u2460\u2460"}],"title":"4.7.2. Runtime exceptions"}],"url":"#towebassemblyvalue"},
"webassembly-throw": {"dfnID":"webassembly-throw","dfnText":"throw","external":false,"refSections":[{"refs":[{"id":"ref-for-webassembly-throw"}],"title":"4.4. Tables"},{"refs":[{"id":"ref-for-webassembly-throw\u2460"},{"id":"ref-for-webassembly-throw\u2461"}],"title":"4.6. Exported Functions"}],"url":"#webassembly-throw"},
};
document.addEventListener("DOMContentLoaded", ()=>{
genAllDfnPanels();
document.body.addEventListener("click", (e) => {
// If not handled already, just hide all dfn panels.
hideAllDfnPanels();
});
});
window.addEventListener("resize", () => {
// Pin any visible dfn panel
queryAll(".dfn-panel.on, .dfn-panel.activated").forEach(el=>positionDfnPanel(el));
});
function genAllDfnPanels() {
for(const panelData of Object.values(dfnPanelData)) {
const dfnID = panelData.dfnID;
const dfn = document.getElementById(dfnID);
if(!dfn) {
console.log(`Can't find dfn#${dfnID}.`, panelData);
continue;
}
dfn.panelData = panelData;
insertDfnPopupAction(dfn);
}
}
function genDfnPanel(dfn, { dfnID, url, dfnText, refSections, external }) {
const dfnPanel = mk.aside({
class: "dfn-panel on",
id: `infopanel-for-${dfnID}`,
"data-for": dfnID,
"aria-labelled-by":`infopaneltitle-for-${dfnID}`,
},
mk.span({id:`infopaneltitle-for-${dfnID}`, style:"display:none"},
`Info about the '${dfnText}' ${external?"external":""} reference.`),
mk.a({href:url, class:"dfn-link"}, url),
refSections.length == 0 ? [] :
mk.b({}, "Referenced in:"),
mk.ul({},
...refSections.map(section=>
mk.li({},
...section.refs.map((ref, refI)=>
[
mk.a({ href: `#${ref.id}` },
(refI == 0) ? section.title : `(${refI + 1})`
),
" ",
]
),
),
),
),
genLinkingSyntaxes(dfn),
);
dfnPanel.addEventListener('click', (event) => {
if (event.target.nodeName == 'A') {
scrollToTargetAndHighlight(event);
pinDfnPanel(dfnPanel);
}
event.stopPropagation();
refocusOnTarget(event);
});
dfnPanel.addEventListener('keydown', (event) => {
if(event.keyCode == 27) { // Escape key
hideDfnPanel({dfnPanel});
event.stopPropagation();
event.preventDefault();
}
});
dfnPanel.dfn = dfn;
dfn.dfnPanel = dfnPanel;
return dfnPanel;
}
function hideAllDfnPanels() {
// Delete the currently-active dfn panel.
queryAll(".dfn-panel").forEach(dfnPanel=>hideDfnPanel({dfnPanel}));
}
function showDfnPanel(dfn) {
hideAllDfnPanels(); // Only display one at a time.
dfn.setAttribute("aria-expanded", "true");
const dfnPanel = genDfnPanel(dfn, dfn.panelData);
// Give the dfn a unique tabindex, and then
// give all the tabbable panel bits successive indexes.
let tabIndex = 100;
dfn.tabIndex = tabIndex++;
const tabbable = dfnPanel.querySelectorAll(":is(a, button)");
for (const el of tabbable) {
el.tabIndex = tabIndex++;
}
append(document.body, dfnPanel);
positionDfnPanel(dfnPanel);
}
function positionDfnPanel(dfnPanel) {
const dfn = dfnPanel.dfn;
const dfnPos = getBounds(dfn);
dfnPanel.style.top = dfnPos.bottom + "px";
dfnPanel.style.left = dfnPos.left + "px";
const panelPos = dfnPanel.getBoundingClientRect();
const panelMargin = 8;
const maxRight = document.body.parentNode.clientWidth - panelMargin;
if (panelPos.right > maxRight) {
const overflowAmount = panelPos.right - maxRight;
const newLeft = Math.max(panelMargin, dfnPos.left - overflowAmount);
dfnPanel.style.left = newLeft + "px";
}
}
function pinDfnPanel(dfnPanel) {
// Switch it to "activated" state, which pins it.
dfnPanel.classList.add("activated");
dfnPanel.style.position = "fixed";
dfnPanel.style.left = null;
dfnPanel.style.top = null;
}
function hideDfnPanel({dfn, dfnPanel}) {
if(!dfnPanel) dfnPanel = dfn.dfnPanel;
if(!dfn) dfn = dfnPanel.dfn;
dfn.dfnPanel = undefined;
dfnPanel.dfn = undefined;
dfn.setAttribute("aria-expanded", "false");
dfn.tabIndex = undefined;
dfnPanel.remove()
}
function toggleDfnPanel(dfn) {
if(dfn.dfnPanel) {
hideDfnPanel(dfn);
} else {
showDfnPanel(dfn);
}
}
function insertDfnPopupAction(dfn) {
dfn.setAttribute('role', 'button');
dfn.setAttribute('aria-expanded', 'false')
dfn.tabIndex = 0;
dfn.classList.add('has-dfn-panel');
dfn.addEventListener('click', (event) => {
toggleDfnPanel(dfn);
event.stopPropagation();
});
dfn.addEventListener('keypress', (event) => {
const kc = event.keyCode;
// 32->Space, 13->Enter
if(kc == 32 || kc == 13) {
toggleDfnPanel(dfn);
event.stopPropagation();
event.preventDefault();
}
});
}
function refocusOnTarget(event) {
const target = event.target;
setTimeout(() => {
// Refocus on the event.target element.
// This is needed after browser scrolls to the destination.
target.focus();
});
}
// TODO: shared util
// Returns the root-level absolute position {left and top} of element.
function getBounds(el, relativeTo=document.body) {
const relativeRect = relativeTo.getBoundingClientRect();
const elRect = el.getBoundingClientRect();
const top = elRect.top - relativeRect.top;
const left = elRect.left - relativeRect.left;
return {
top,
left,
bottom: top + elRect.height,
right: left + elRect.width,
}
}
function scrollToTargetAndHighlight(event) {
let hash = event.target.hash;
if (hash) {
hash = decodeURIComponent(hash.substring(1));
const dest = document.getElementById(hash);
if (dest) {
dest.classList.add('highlighted');
setTimeout(() => dest.classList.remove('highlighted'), 1000);
}
}
}
// Functions, divided by link type, that wrap an autolink's
// contents with the appropriate outer syntax.
// Alternately, a string naming another type they format
// the same as.
function needsFor(type) {
switch(type) {
case "descriptor":
case "value":
case "element-attr":
case "attr-value":
case "element-state":
case "method":
case "constructor":
case "argument":
case "attribute":
case "const":
case "dict-member":
case "event":
case "enum-value":
case "stringifier":
case "serializer":
case "iterator":
case "maplike":
case "setlike":
case "state":
case "mode":
case "context":
case "facet": return true;
default: return false;
}
}
function refusesFor(type) {
switch(type) {
case "property":
case "element":
case "interface":
case "namespace":
case "callback":
case "dictionary":
case "enum":
case "exception":
case "typedef":
case "http-header":
case "permission": return true;
default: return false;
}
}
function linkFormatterFromType(type) {
switch(type) {
case 'scheme':
case 'permission':
case 'dfn': return (text) => `[=${text}=]`;
case 'abstract-op': return (text) => `[\$${text}\$]`;
case 'function':
case 'at-rule':
case 'selector':
case 'value': return (text) => `''${text}''`;
case 'http-header': return (text) => `[:${text}:]`;
case 'interface':
case 'constructor':
case 'method':
case 'argument':
case 'attribute':
case 'callback':
case 'dictionary':
case 'dict-member':
case 'enum':
case 'enum-value':
case 'exception':
case 'const':
case 'typedef':
case 'stringifier':
case 'serializer':
case 'iterator':
case 'maplike':
case 'setlike':
case 'extended-attribute':
case 'event':
case 'idl': return (text) => `{{${text}}}`;
case 'element-state':
case 'element-attr':
case 'attr-value':
case 'element': return (element) => `<{${element}}>`;
case 'grammar': return (text) => `${text} (within a <pre class=prod>)`;
case 'type': return (text)=> `<<${text}>>`;
case 'descriptor':
case 'property': return (text) => `'${text}'`;
default: return;
};
};
function genLinkingSyntaxes(dfn) {
if(dfn.tagName != "DFN") return;
const type = dfn.getAttribute('data-dfn-type');
if(!type) {
console.log(`<dfn> doesn't have a data-dfn-type:`, dfn);
return [];
}
// Return a function that wraps link text based on the type
const linkFormatter = linkFormatterFromType(type);
if(!linkFormatter) {
console.log(`<dfn> has an unknown data-dfn-type:`, dfn);
return [];
}
let ltAlts;
if(dfn.hasAttribute('data-lt')) {
ltAlts = dfn.getAttribute('data-lt')
.split("|")
.map(x=>x.trim());
} else {
ltAlts = [dfn.textContent.trim()];
}
if(type == "type") {
// lt of "<foo>", but "foo" is the interior;
// <<foo/bar>> is how you write it with a for,
// not <foo/<bar>> or whatever.
for(var i = 0; i < ltAlts.length; i++) {
const lt = ltAlts[i];
const match = /<(.*)>/.exec(lt);
if(match) { ltAlts[i] = match[1]; }
}
}
let forAlts;
if(dfn.hasAttribute('data-dfn-for')) {
forAlts = dfn.getAttribute('data-dfn-for')
.split(",")
.map(x=>x.trim());
} else {
forAlts = [''];
}
let linkingSyntaxes = [];
if(!needsFor(type)) {
for(const lt of ltAlts) {
linkingSyntaxes.push(linkFormatter(lt));
}
}
if(!refusesFor(type)) {
for(const f of forAlts) {
linkingSyntaxes.push(linkFormatter(`${f}/${ltAlts[0]}`))
}
}
return [
mk.b({}, 'Possible linking syntaxes:'),
mk.ul({},
...linkingSyntaxes.map(link => {
const copyLink = async () =>
await navigator.clipboard.writeText(link);
return mk.li({},
mk.div({ class: 'link-item' },
mk.button({
class: 'copy-icon', title: 'Copy',
type: 'button',
_onclick: copyLink,
tabindex: 0,
}, mk.span({ class: 'icon' }) ),
mk.span({}, link)
)
);
})
)
];
}
}
</script>
<script>/* Boilerplate: script-ref-hints */
"use strict";
{
let refsData = {
"#a-new-exported-function": {"displayText":"a new exported function","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"a new exported function","type":"dfn","url":"#a-new-exported-function"},
"#associated-store": {"displayText":"associated store","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"associated store","type":"dfn","url":"#associated-store"},
"#asynchronously-compile-a-webassembly-module": {"displayText":"asynchronously compile a webassembly module","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"asynchronously compile a webassembly module","type":"dfn","url":"#asynchronously-compile-a-webassembly-module"},
"#asynchronously-instantiate-a-webassembly-module": {"displayText":"asynchronously instantiate a webassembly module","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"asynchronously instantiate a webassembly module","type":"dfn","url":"#asynchronously-instantiate-a-webassembly-module"},
"#call-an-exported-function": {"displayText":"call an exported function","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"call an exported function","type":"dfn","url":"#call-an-exported-function"},
"#compile-a-webassembly-module": {"displayText":"compile a webassembly module","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"compile a webassembly module","type":"dfn","url":"#compile-a-webassembly-module"},
"#construct-a-webassembly-module-object": {"displayText":"construct a webassembly module object","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"construct a webassembly module object","type":"dfn","url":"#construct-a-webassembly-module-object"},
"#create-a-global-object": {"displayText":"create a global object","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"create a global object","type":"dfn","url":"#create-a-global-object"},
"#create-a-host-function": {"displayText":"create a host function","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"create a host function","type":"dfn","url":"#create-a-host-function"},
"#create-a-memory-buffer": {"displayText":"create a memory buffer","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"create a memory buffer","type":"dfn","url":"#create-a-memory-buffer"},
"#create-a-memory-object": {"displayText":"create a memory object","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"create a memory object","type":"dfn","url":"#create-a-memory-object"},
"#create-a-table-object": {"displayText":"create a table object","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"create a table object","type":"dfn","url":"#create-a-table-object"},
"#create-a-tag-object": {"displayText":"create a tag object","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"create a tag object","type":"dfn","url":"#create-a-tag-object"},
"#create-an-exception-object": {"displayText":"create an exception object","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"create an exception object","type":"dfn","url":"#create-an-exception-object"},
"#create-an-exports-object": {"displayText":"create an exports object","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"create an exports object","type":"dfn","url":"#create-an-exports-object"},
"#defaultvalue": {"displayText":"defaultvalue","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"defaultvalue","type":"dfn","url":"#defaultvalue"},
"#dictdef-exceptionoptions": {"displayText":"ExceptionOptions","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"ExceptionOptions","type":"dictionary","url":"#dictdef-exceptionoptions"},
"#dictdef-globaldescriptor": {"displayText":"GlobalDescriptor","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"GlobalDescriptor","type":"dictionary","url":"#dictdef-globaldescriptor"},
"#dictdef-memorydescriptor": {"displayText":"MemoryDescriptor","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"MemoryDescriptor","type":"dictionary","url":"#dictdef-memorydescriptor"},
"#dictdef-moduleexportdescriptor": {"displayText":"ModuleExportDescriptor","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"ModuleExportDescriptor","type":"dictionary","url":"#dictdef-moduleexportdescriptor"},
"#dictdef-moduleimportdescriptor": {"displayText":"ModuleImportDescriptor","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"ModuleImportDescriptor","type":"dictionary","url":"#dictdef-moduleimportdescriptor"},
"#dictdef-tabledescriptor": {"displayText":"TableDescriptor","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"TableDescriptor","type":"dictionary","url":"#dictdef-tabledescriptor"},
"#dictdef-tagtype": {"displayText":"TagType","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"TagType","type":"dictionary","url":"#dictdef-tagtype"},
"#dictdef-webassemblyinstantiatedsource": {"displayText":"WebAssemblyInstantiatedSource","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"WebAssemblyInstantiatedSource","type":"dictionary","url":"#dictdef-webassemblyinstantiatedsource"},
"#dom-exception-exception": {"displayText":"Exception(exceptionTag, payload, options)","export":true,"for_":["Exception"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"Exception(exceptionTag, payload, options)","type":"constructor","url":"#dom-exception-exception"},
"#dom-exception-getarg": {"displayText":"getArg(exceptionTag, index)","export":true,"for_":["Exception"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"getArg(exceptionTag, index)","type":"method","url":"#dom-exception-getarg"},
"#dom-exception-is": {"displayText":"is(exceptionTag)","export":true,"for_":["Exception"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"is(exceptionTag)","type":"method","url":"#dom-exception-is"},
"#dom-exception-stack": {"displayText":"stack","export":true,"for_":["Exception"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"stack","type":"attribute","url":"#dom-exception-stack"},
"#dom-global-global": {"displayText":"Global(descriptor, v)","export":true,"for_":["Global"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"Global(descriptor, v)","type":"constructor","url":"#dom-global-global"},
"#dom-global-value": {"displayText":"value","export":true,"for_":["Global"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"value","type":"attribute","url":"#dom-global-value"},
"#dom-global-valueof": {"displayText":"valueOf()","export":true,"for_":["Global"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"valueOf()","type":"method","url":"#dom-global-valueof"},
"#dom-instance-exports": {"displayText":"exports","export":true,"for_":["Instance"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"exports","type":"attribute","url":"#dom-instance-exports"},
"#dom-instance-instance": {"displayText":"Instance(module, importObject)","export":true,"for_":["Instance"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"Instance(module, importObject)","type":"constructor","url":"#dom-instance-instance"},
"#dom-memory-buffer": {"displayText":"buffer","export":true,"for_":["Memory"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"buffer","type":"attribute","url":"#dom-memory-buffer"},
"#dom-memory-grow": {"displayText":"grow(delta)","export":true,"for_":["Memory"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"grow(delta)","type":"method","url":"#dom-memory-grow"},
"#dom-memory-memory": {"displayText":"Memory(descriptor)","export":true,"for_":["Memory"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"Memory(descriptor)","type":"constructor","url":"#dom-memory-memory"},
"#dom-module-customsections": {"displayText":"customSections(moduleObject, sectionName)","export":true,"for_":["Module"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"customSections(moduleObject, sectionName)","type":"method","url":"#dom-module-customsections"},
"#dom-module-exports": {"displayText":"exports(moduleObject)","export":true,"for_":["Module"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"exports(moduleObject)","type":"method","url":"#dom-module-exports"},
"#dom-module-imports": {"displayText":"imports(moduleObject)","export":true,"for_":["Module"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"imports(moduleObject)","type":"method","url":"#dom-module-imports"},
"#dom-module-module": {"displayText":"Module(bytes)","export":true,"for_":["Module"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"Module(bytes)","type":"constructor","url":"#dom-module-module"},
"#dom-moduleexportdescriptor-kind": {"displayText":"kind","export":true,"for_":["ModuleExportDescriptor"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"kind","type":"dict-member","url":"#dom-moduleexportdescriptor-kind"},
"#dom-moduleexportdescriptor-name": {"displayText":"name","export":true,"for_":["ModuleExportDescriptor"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"name","type":"dict-member","url":"#dom-moduleexportdescriptor-name"},
"#dom-moduleimportdescriptor-kind": {"displayText":"kind","export":true,"for_":["ModuleImportDescriptor"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"kind","type":"dict-member","url":"#dom-moduleimportdescriptor-kind"},
"#dom-moduleimportdescriptor-module": {"displayText":"module","export":true,"for_":["ModuleImportDescriptor"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"module","type":"dict-member","url":"#dom-moduleimportdescriptor-module"},
"#dom-moduleimportdescriptor-name": {"displayText":"name","export":true,"for_":["ModuleImportDescriptor"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"name","type":"dict-member","url":"#dom-moduleimportdescriptor-name"},
"#dom-table-get": {"displayText":"get(index)","export":true,"for_":["Table"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"get(index)","type":"method","url":"#dom-table-get"},
"#dom-table-grow": {"displayText":"grow(delta, value)","export":true,"for_":["Table"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"grow(delta, value)","type":"method","url":"#dom-table-grow"},
"#dom-table-length": {"displayText":"length","export":true,"for_":["Table"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"length","type":"attribute","url":"#dom-table-length"},
"#dom-table-set": {"displayText":"set(index, value)","export":true,"for_":["Table"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"set(index, value)","type":"method","url":"#dom-table-set"},
"#dom-table-table": {"displayText":"Table(descriptor, value)","export":true,"for_":["Table"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"Table(descriptor, value)","type":"constructor","url":"#dom-table-table"},
"#dom-tag-tag": {"displayText":"Tag(type)","export":true,"for_":["Tag"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"Tag(type)","type":"constructor","url":"#dom-tag-tag"},
"#dom-tag-type": {"displayText":"type()","export":true,"for_":["Tag"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"type()","type":"method","url":"#dom-tag-type"},
"#dom-tagtype-parameters": {"displayText":"parameters","export":true,"for_":["TagType"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"parameters","type":"dict-member","url":"#dom-tagtype-parameters"},
"#dom-webassembly-compile": {"displayText":"compile(bytes)","export":true,"for_":["WebAssembly"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"compile(bytes)","type":"method","url":"#dom-webassembly-compile"},
"#dom-webassembly-instantiate": {"displayText":"instantiate(bytes, importObject)","export":true,"for_":["WebAssembly"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"instantiate(bytes, importObject)","type":"method","url":"#dom-webassembly-instantiate"},
"#dom-webassembly-instantiate-moduleobject-importobject": {"displayText":"instantiate(moduleObject, importObject)","export":true,"for_":["WebAssembly"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"instantiate(moduleObject, importObject)","type":"method","url":"#dom-webassembly-instantiate-moduleobject-importobject"},
"#dom-webassembly-validate": {"displayText":"validate(bytes)","export":true,"for_":["WebAssembly"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"validate(bytes)","type":"method","url":"#dom-webassembly-validate"},
"#dom-webassemblyinstantiatedsource-instance": {"displayText":"instance","export":true,"for_":["WebAssemblyInstantiatedSource"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"instance","type":"dict-member","url":"#dom-webassemblyinstantiatedsource-instance"},
"#dom-webassemblyinstantiatedsource-module": {"displayText":"module","export":true,"for_":["WebAssemblyInstantiatedSource"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"module","type":"dict-member","url":"#dom-webassemblyinstantiatedsource-module"},
"#enumdef-importexportkind": {"displayText":"ImportExportKind","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"ImportExportKind","type":"enum","url":"#enumdef-importexportkind"},
"#enumdef-tablekind": {"displayText":"TableKind","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"TableKind","type":"enum","url":"#enumdef-tablekind"},
"#enumdef-valuetype": {"displayText":"ValueType","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"ValueType","type":"enum","url":"#enumdef-valuetype"},
"#exception": {"displayText":"Exception","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"Exception","type":"interface","url":"#exception"},
"#exceptiondef-compileerror": {"displayText":"CompileError","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"CompileError","type":"exception","url":"#exceptiondef-compileerror"},
"#exceptiondef-linkerror": {"displayText":"LinkError","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"LinkError","type":"exception","url":"#exceptiondef-linkerror"},
"#exceptiondef-runtimeerror": {"displayText":"RuntimeError","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"RuntimeError","type":"exception","url":"#exceptiondef-runtimeerror"},
"#exported-function": {"displayText":"exported function","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"exported function","type":"dfn","url":"#exported-function"},
"#exported-function-cache": {"displayText":"exported function cache","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"exported function cache","type":"dfn","url":"#exported-function-cache"},
"#extern-value-cache": {"displayText":"extern value cache","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"extern value cache","type":"dfn","url":"#extern-value-cache"},
"#getglobalvalue": {"displayText":"getglobalvalue","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"getglobalvalue","type":"dfn","url":"#getglobalvalue"},
"#global": {"displayText":"Global","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"Global","type":"interface","url":"#global"},
"#global-object-cache": {"displayText":"global object cache","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"global object cache","type":"dfn","url":"#global-object-cache"},
"#identified-with": {"displayText":"identified with","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"identified with","type":"dfn","url":"#identified-with"},
"#index-of-the-host-function": {"displayText":"index of the host function","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"index of the host function","type":"dfn","url":"#index-of-the-host-function"},
"#initialize-a-global-object": {"displayText":"initialize a global object","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"initialize a global object","type":"dfn","url":"#initialize-a-global-object"},
"#initialize-a-memory-object": {"displayText":"initialize a memory object","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"initialize a memory object","type":"dfn","url":"#initialize-a-memory-object"},
"#initialize-a-table-object": {"displayText":"initialize a table object","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"initialize a table object","type":"dfn","url":"#initialize-a-table-object"},
"#initialize-a-tag-object": {"displayText":"initialize a tag object","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"initialize a tag object","type":"dfn","url":"#initialize-a-tag-object"},
"#initialize-an-instance-object": {"displayText":"initialize an instance object","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"initialize an instance object","type":"dfn","url":"#initialize-an-instance-object"},
"#instance": {"displayText":"Instance","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"Instance","type":"interface","url":"#instance"},
"#instantiate-a-promise-of-a-module": {"displayText":"instantiate a promise of a module","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"instantiate a promise of a module","type":"dfn","url":"#instantiate-a-promise-of-a-module"},
"#instantiate-the-core-of-a-webassembly-module": {"displayText":"instantiate the core of a webassembly module","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"instantiate the core of a webassembly module","type":"dfn","url":"#instantiate-the-core-of-a-webassembly-module"},
"#javascript-exception-tag": {"displayText":"javascript exception tag","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"javascript exception tag","type":"dfn","url":"#javascript-exception-tag"},
"#memory": {"displayText":"Memory","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"Memory","type":"interface","url":"#memory"},
"#memory-object-cache": {"displayText":"memory object cache","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"memory object cache","type":"dfn","url":"#memory-object-cache"},
"#module": {"displayText":"Module","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"Module","type":"interface","url":"#module"},
"#name-of-the-webassembly-function": {"displayText":"name of the webassembly function","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"name of the webassembly function","type":"dfn","url":"#name-of-the-webassembly-function"},
"#namespacedef-webassembly": {"displayText":"WebAssembly","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"WebAssembly","type":"namespace","url":"#namespacedef-webassembly"},
"#read-the-imports": {"displayText":"read the imports","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"read the imports","type":"dfn","url":"#read-the-imports"},
"#reset-the-memory-buffer": {"displayText":"reset the memory buffer","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"reset the memory buffer","type":"dfn","url":"#reset-the-memory-buffer"},
"#retrieving-an-extern-value": {"displayText":"retrieving an extern value","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"retrieving an extern value","type":"dfn","url":"#retrieving-an-extern-value"},
"#run-a-host-function": {"displayText":"run a host function","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"run a host function","type":"dfn","url":"#run-a-host-function"},
"#string-value-of-the-extern-type": {"displayText":"string value of the extern type","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"string value of the extern type","type":"dfn","url":"#string-value-of-the-extern-type"},
"#table": {"displayText":"Table","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"Table","type":"interface","url":"#table"},
"#table-object-cache": {"displayText":"table object cache","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"table object cache","type":"dfn","url":"#table-object-cache"},
"#tag": {"displayText":"Tag","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"Tag","type":"interface","url":"#tag"},
"#tag-object-cache": {"displayText":"tag object cache","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"tag object cache","type":"dfn","url":"#tag-object-cache"},
"#tag_alloc": {"displayText":"tag_alloc","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"tag_alloc","type":"dfn","url":"#tag_alloc"},
"#tag_parameters": {"displayText":"tag_parameters","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"tag_parameters","type":"dfn","url":"#tag_parameters"},
"#tojsvalue": {"displayText":"tojsvalue","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"tojsvalue","type":"dfn","url":"#tojsvalue"},
"#tovaluetype": {"displayText":"tovaluetype","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"tovaluetype","type":"dfn","url":"#tovaluetype"},
"#towebassemblyvalue": {"displayText":"towebassemblyvalue","export":true,"for_":[],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"towebassemblyvalue","type":"dfn","url":"#towebassemblyvalue"},
"#webassembly-throw": {"displayText":"throw","export":true,"for_":["WebAssembly"],"level":"2","normative":true,"shortname":"wasm-js-api","spec":"wasm-js-api-2","status":"local","text":"throw","type":"dfn","url":"#webassembly-throw"},
"01689b05_https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-numtype": {"displayText":"f64","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"f64","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-numtype"},
"0782cc57_https://webassembly.github.io/exception-handling/core/exec/runtime.html#values": {"displayText":"f64.const","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"f64.const","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#values"},
"07b2e8ca_https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-mut": {"displayText":"var","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"var","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-mut"},
"1fee0bd3_https://webassembly.github.io/exception-handling/core/syntax/types.html#external-types": {"displayText":"mem","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"mem","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#external-types"},
"21fcce43_https://webassembly.github.io/exception-handling/core/exec/runtime.html#values": {"displayText":"ref.null","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"ref.null","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#values"},
"2461a609_https://webassembly.github.io/exception-handling/core/exec/runtime.html#values": {"displayText":"f32.const","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"f32.const","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#values"},
"38f42dd7_https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-numtype": {"displayText":"f32","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"f32","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-numtype"},
"526eaab3_https://webassembly.github.io/exception-handling/core/valid/modules.html#valid-module": {"displayText":"valid","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"valid","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/valid/modules.html#valid-module"},
"54ccbc1d_https://webassembly.github.io/exception-handling/core/exec/runtime.html#values": {"displayText":"v128.const","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"v128.const","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#values"},
"5a26c06c_https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externval": {"displayText":"tag","export":true,"for_":["external value"],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"tag","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externval"},
"6295139b_https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-reftype": {"displayText":"externref","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"externref","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-reftype"},
"80642084_https://webassembly.github.io/exception-handling/core/syntax/values.html#syntax-float": {"displayText":"signif","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"signif","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/syntax/values.html#syntax-float"},
"844a951c_https://webassembly.github.io/exception-handling/core/exec/runtime.html#values": {"displayText":"ref.extern","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"ref.extern","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#values"},
"850ab208_https://webassembly.github.io/exception-handling/core/syntax/values.html#syntax-float": {"displayText":"\u2212\u221e","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"\u2212\u221e","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/syntax/values.html#syntax-float"},
"8c460f10_https://webassembly.github.io/exception-handling/core/syntax/modules.html#syntax-module": {"displayText":"imports","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"imports","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/syntax/modules.html#syntax-module"},
"960a3c13_https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-reftype": {"displayText":"funcref","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"funcref","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-reftype"},
"9869f381_https://webassembly.github.io/exception-handling/core/syntax/types.html#external-types": {"displayText":"tag","export":true,"for_":["externtype"],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"tag","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#external-types"},
"ad93d751_https://webassembly.github.io/exception-handling/core/exec/runtime.html#values": {"displayText":"i64.const","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"i64.const","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#values"},
"b8c44e95_https://webassembly.github.io/exception-handling/core/exec/runtime.html#values": {"displayText":"WebAssembly value","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"webassembly value","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#values"},
"c2122786_https://webassembly.github.io/exception-handling/core/syntax/values.html#syntax-float": {"displayText":"canon","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"canon","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/syntax/values.html#syntax-float"},
"c47e6fe0_https://webassembly.github.io/exception-handling/core/syntax/types.html#external-types": {"displayText":"table","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"table","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#external-types"},
"cb68a816_https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-numtype": {"displayText":"i32","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"i32","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-numtype"},
"d47a44ce_https://webassembly.github.io/exception-handling/core/exec/runtime.html#values": {"displayText":"ref.func","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"ref.func","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#values"},
"de80bf22_https://webassembly.github.io/exception-handling/core/syntax/types.html#external-types": {"displayText":"global","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"global","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#external-types"},
"e2c10855_https://webassembly.github.io/exception-handling/core/syntax/values.html#syntax-float": {"displayText":"nan","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"nan","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/syntax/values.html#syntax-float"},
"ed607b12_https://webassembly.github.io/exception-handling/core/exec/numerics.html#aux-signed": {"displayText":"signed_32","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"signed_32","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/exec/numerics.html#aux-signed"},
"f4fa6c3b_https://tc39.github.io/ecma262/#sec-returnifabrupt-shorthands": {"displayText":"!","export":true,"for_":[],"level":"","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"anchor-block","text":"!","type":"dfn","url":"https://tc39.github.io/ecma262/#sec-returnifabrupt-shorthands"},
"https://encoding.spec.whatwg.org/#utf-8-decode-without-bom-or-fail": {"displayText":"UTF-8 decode without BOM or fail","export":true,"for_":[],"level":"1","normative":true,"shortname":"encoding","spec":"encoding","status":"current","text":"utf-8 decode without bom or fail","type":"dfn","url":"https://encoding.spec.whatwg.org/#utf-8-decode-without-bom-or-fail"},
"https://heycam.github.io/webidl/#create-a-namespace-object": {"displayText":"create a namespace object","export":true,"for_":[],"level":"","normative":true,"shortname":"webidl","spec":"webidl","status":"anchor-block","text":"create a namespace object","type":"dfn","url":"https://heycam.github.io/webidl/#create-a-namespace-object"},
"https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel": {"displayText":"in parallel","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"in parallel","type":"dfn","url":"https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel"},
"https://html.spec.whatwg.org/multipage/webappapis.html#clean-up-after-running-a-callback": {"displayText":"clean up after running a callback","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"clean up after running a callback","type":"dfn","url":"https://html.spec.whatwg.org/multipage/webappapis.html#clean-up-after-running-a-callback"},
"https://html.spec.whatwg.org/multipage/webappapis.html#clean-up-after-running-script": {"displayText":"clean up after running script","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"clean up after running script","type":"dfn","url":"https://html.spec.whatwg.org/multipage/webappapis.html#clean-up-after-running-script"},
"https://html.spec.whatwg.org/multipage/webappapis.html#concept-realm-settings-object": {"displayText":"settings object","export":true,"for_":["realm"],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"settings object","type":"dfn","url":"https://html.spec.whatwg.org/multipage/webappapis.html#concept-realm-settings-object"},
"https://html.spec.whatwg.org/multipage/webappapis.html#incumbent-settings-object": {"displayText":"incumbent settings object","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"incumbent settings object","type":"dfn","url":"https://html.spec.whatwg.org/multipage/webappapis.html#incumbent-settings-object"},
"https://html.spec.whatwg.org/multipage/webappapis.html#prepare-to-run-a-callback": {"displayText":"prepare to run a callback","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"prepare to run a callback","type":"dfn","url":"https://html.spec.whatwg.org/multipage/webappapis.html#prepare-to-run-a-callback"},
"https://html.spec.whatwg.org/multipage/webappapis.html#prepare-to-run-script": {"displayText":"prepare to run script","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"prepare to run script","type":"dfn","url":"https://html.spec.whatwg.org/multipage/webappapis.html#prepare-to-run-script"},
"https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task": {"displayText":"queue a task","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"queue a task","type":"dfn","url":"https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task"},
"https://html.spec.whatwg.org/multipage/webappapis.html#realm's-agent": {"displayText":"agent","export":true,"for_":["realm"],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"agent","type":"dfn","url":"https://html.spec.whatwg.org/multipage/webappapis.html#realm's-agent"},
"https://html.spec.whatwg.org/multipage/webappapis.html#task-source": {"displayText":"task source","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"task source","type":"dfn","url":"https://html.spec.whatwg.org/multipage/webappapis.html#task-source"},
"https://infra.spec.whatwg.org/#list": {"displayText":"list","export":true,"for_":[],"level":"1","normative":true,"shortname":"infra","spec":"infra","status":"current","text":"list","type":"dfn","url":"https://infra.spec.whatwg.org/#list"},
"https://infra.spec.whatwg.org/#list-append": {"displayText":"append","export":true,"for_":["list"],"level":"1","normative":true,"shortname":"infra","spec":"infra","status":"current","text":"append","type":"dfn","url":"https://infra.spec.whatwg.org/#list-append"},
"https://infra.spec.whatwg.org/#list-is-empty": {"displayText":"is empty","export":true,"for_":["list","stack","queue","set"],"level":"1","normative":true,"shortname":"infra","spec":"infra","status":"current","text":"is empty","type":"dfn","url":"https://infra.spec.whatwg.org/#list-is-empty"},
"https://infra.spec.whatwg.org/#list-iterate": {"displayText":"iterate","export":true,"for_":["list","set"],"level":"1","normative":true,"shortname":"infra","spec":"infra","status":"current","text":"iterate","type":"dfn","url":"https://infra.spec.whatwg.org/#list-iterate"},
"https://infra.spec.whatwg.org/#list-size": {"displayText":"size","export":true,"for_":["list","stack","queue","set"],"level":"1","normative":true,"shortname":"infra","spec":"infra","status":"current","text":"size","type":"dfn","url":"https://infra.spec.whatwg.org/#list-size"},
"https://infra.spec.whatwg.org/#map-exists": {"displayText":"exist","export":true,"for_":["map"],"level":"1","normative":true,"shortname":"infra","spec":"infra","status":"current","text":"exist","type":"dfn","url":"https://infra.spec.whatwg.org/#map-exists"},
"https://infra.spec.whatwg.org/#map-set": {"displayText":"set","export":true,"for_":["map"],"level":"1","normative":true,"shortname":"infra","spec":"infra","status":"current","text":"set","type":"dfn","url":"https://infra.spec.whatwg.org/#map-set"},
"https://infra.spec.whatwg.org/#ordered-map": {"displayText":"ordered map","export":true,"for_":[],"level":"1","normative":true,"shortname":"infra","spec":"infra","status":"current","text":"ordered map","type":"dfn","url":"https://infra.spec.whatwg.org/#ordered-map"},
"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-call": {"displayText":"Call","export":true,"for_":[],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"Call","type":"abstract-op","url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-call"},
"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-createarrayfromlist": {"displayText":"CreateArrayFromList","export":true,"for_":[],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"CreateArrayFromList","type":"abstract-op","url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-createarrayfromlist"},
"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-createdataproperty": {"displayText":"CreateDataProperty","export":true,"for_":[],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"CreateDataProperty","type":"abstract-op","url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-createdataproperty"},
"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-get-o-p": {"displayText":"Get","export":true,"for_":[],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"Get","type":"abstract-op","url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-get-o-p"},
"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-getmethod": {"displayText":"GetMethod","export":true,"for_":[],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"GetMethod","type":"abstract-op","url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-getmethod"},
"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-iscallable": {"displayText":"IsCallable","export":true,"for_":[],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"IsCallable","type":"abstract-op","url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-iscallable"},
"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-setintegritylevel": {"displayText":"SetIntegrityLevel","export":true,"for_":[],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"SetIntegrityLevel","type":"abstract-op","url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-setintegritylevel"},
"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-tobigint64": {"displayText":"ToBigInt64","export":true,"for_":[],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"ToBigInt64","type":"abstract-op","url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-tobigint64"},
"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-toint32": {"displayText":"ToInt32","export":true,"for_":[],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"ToInt32","type":"abstract-op","url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-toint32"},
"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-tonumber": {"displayText":"ToNumber","export":true,"for_":[],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"ToNumber","type":"abstract-op","url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-tonumber"},
"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-tostring": {"displayText":"ToString","export":true,"for_":[],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"ToString","type":"abstract-op","url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-tostring"},
"https://tc39.es/ecma262/multipage/ecmascript-data-types-and-values.html#sec-data-blocks": {"displayText":"Data Block","export":true,"for_":["ECMAScript"],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"data block","type":"dfn","url":"https://tc39.es/ecma262/multipage/ecmascript-data-types-and-values.html#sec-data-blocks"},
"https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#sec-agent-clusters": {"displayText":"agent cluster","export":true,"for_":["ECMAScript"],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"agent cluster","type":"dfn","url":"https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#sec-agent-clusters"},
"https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent": {"displayText":"surrounding agent","export":true,"for_":["ECMAScript"],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"surrounding agent","type":"dfn","url":"https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#surrounding-agent"},
"https://tc39.es/ecma262/multipage/ordinary-and-exotic-objects-behaviours.html#sec-createbuiltinfunction": {"displayText":"CreateBuiltinFunction","export":true,"for_":[],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"CreateBuiltinFunction","type":"abstract-op","url":"https://tc39.es/ecma262/multipage/ordinary-and-exotic-objects-behaviours.html#sec-createbuiltinfunction"},
"https://tc39.es/ecma262/multipage/ordinary-and-exotic-objects-behaviours.html#sec-ordinaryobjectcreate": {"displayText":"OrdinaryObjectCreate","export":true,"for_":[],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"OrdinaryObjectCreate","type":"abstract-op","url":"https://tc39.es/ecma262/multipage/ordinary-and-exotic-objects-behaviours.html#sec-ordinaryobjectcreate"},
"https://tc39.es/ecma262/multipage/structured-data.html#sec-detacharraybuffer": {"displayText":"DetachArrayBuffer","export":true,"for_":[],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"DetachArrayBuffer","type":"abstract-op","url":"https://tc39.es/ecma262/multipage/structured-data.html#sec-detacharraybuffer"},
"https://tc39.es/ecma262/multipage/structured-data.html#sec-numerictorawbytes": {"displayText":"NumericToRawBytes","export":true,"for_":[],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"NumericToRawBytes","type":"abstract-op","url":"https://tc39.es/ecma262/multipage/structured-data.html#sec-numerictorawbytes"},
"https://tc39.github.io/ecma262/#current-realm": {"displayText":"current Realm","export":true,"for_":[],"level":"","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"anchor-block","text":"current realm","type":"dfn","url":"https://tc39.github.io/ecma262/#current-realm"},
"https://tc39.github.io/ecma262/#sec-arraybuffer-objects": {"displayText":"ArrayBuffer","export":true,"for_":["ECMAScript"],"level":"","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"anchor-block","text":"ArrayBuffer","type":"interface","url":"https://tc39.github.io/ecma262/#sec-arraybuffer-objects"},
"https://tc39.github.io/ecma262/#sec-built-in-function-objects": {"displayText":"Built-in Function Objects","export":true,"for_":[],"level":"","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"anchor-block","text":"built-in function objects","type":"dfn","url":"https://tc39.github.io/ecma262/#sec-built-in-function-objects"},
"https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values": {"displayText":"Type","export":true,"for_":[],"level":"","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"anchor-block","text":"type","type":"dfn","url":"https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values"},
"https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-rangeerror": {"displayText":"RangeError","export":true,"for_":["ECMAScript"],"level":"","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"anchor-block","text":"RangeError","type":"exception","url":"https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-rangeerror"},
"https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-typeerror": {"displayText":"TypeError","export":true,"for_":["ECMAScript"],"level":"","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"anchor-block","text":"TypeError","type":"exception","url":"https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-typeerror"},
"https://tc39.github.io/ecma262/#sec-nativeerror-object-structure": {"displayText":"NativeError Object Structure","export":true,"for_":[],"level":"","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"anchor-block","text":"nativeerror object structure","type":"dfn","url":"https://tc39.github.io/ecma262/#sec-nativeerror-object-structure"},
"https://tc39.github.io/ecma262/#sec-returnifabrupt-shorthands": {"displayText":"?","export":true,"for_":[],"level":"","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"anchor-block","text":"?","type":"dfn","url":"https://tc39.github.io/ecma262/#sec-returnifabrupt-shorthands"},
"https://tc39.github.io/ecma262/#ℤ": {"displayText":"\u2124","export":true,"for_":[],"level":"","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"anchor-block","text":"\u2124","type":"dfn","url":"https://tc39.github.io/ecma262/#\u2124"},
"https://tc39.github.io/ecma262/#𝔽": {"displayText":"\ud835\udd3d","export":true,"for_":[],"level":"","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"anchor-block","text":"\ud835\udd3d","type":"dfn","url":"https://tc39.github.io/ecma262/#\ud835\udd3d"},
"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-error": {"displayText":"error","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"error","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-error"},
"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-func-alloc": {"displayText":"func_alloc","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"func_alloc","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-func-alloc"},
"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-func-invoke": {"displayText":"func_invoke","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"func_invoke","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-func-invoke"},
"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-func-type": {"displayText":"func_type","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"func_type","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-func-type"},
"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-global-alloc": {"displayText":"global_alloc","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"global_alloc","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-global-alloc"},
"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-global-read": {"displayText":"global_read","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"global_read","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-global-read"},
"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-global-type": {"displayText":"global_type","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"global_type","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-global-type"},
"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-global-write": {"displayText":"global_write","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"global_write","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-global-write"},
"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-instance-export": {"displayText":"instance_export","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"instance_export","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-instance-export"},
"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-mem-alloc": {"displayText":"mem_alloc","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"mem_alloc","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-mem-alloc"},
"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-mem-grow": {"displayText":"mem_grow","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"mem_grow","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-mem-grow"},
"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-mem-size": {"displayText":"mem_size","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"mem_size","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-mem-size"},
"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-module-decode": {"displayText":"module_decode","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"module_decode","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-module-decode"},
"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-module-exports": {"displayText":"module_exports","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"module_exports","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-module-exports"},
"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-module-imports": {"displayText":"module_imports","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"module_imports","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-module-imports"},
"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-module-instantiate": {"displayText":"module_instantiate","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"module_instantiate","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-module-instantiate"},
"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-module-validate": {"displayText":"module_validate","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"module_validate","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-module-validate"},
"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-store-init": {"displayText":"store_init","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"store_init","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-store-init"},
"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-table-alloc": {"displayText":"table_alloc","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"table_alloc","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-table-alloc"},
"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-table-grow": {"displayText":"table_grow","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"table_grow","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-table-grow"},
"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-table-read": {"displayText":"table_read","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"table_read","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-table-read"},
"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-table-size": {"displayText":"table_size","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"table_size","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-table-size"},
"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-table-type": {"displayText":"table_type","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"table_type","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-table-type"},
"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-table-write": {"displayText":"table_write","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"table_write","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/appendix/embedding.html#embed-table-write"},
"https://webassembly.github.io/exception-handling/core/binary/modules.html#binary-customsec": {"displayText":"customsec","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"customsec","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/binary/modules.html#binary-customsec"},
"https://webassembly.github.io/exception-handling/core/binary/modules.html#binary-module": {"displayText":"module grammar","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"module grammar","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/binary/modules.html#binary-module"},
"https://webassembly.github.io/exception-handling/core/binary/modules.html#custom-section": {"displayText":"custom section","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"custom section","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/binary/modules.html#custom-section"},
"https://webassembly.github.io/exception-handling/core/exec/conventions.html#exec-notation-textual": {"displayText":"current frame","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"current frame","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/exec/conventions.html#exec-notation-textual"},
"https://webassembly.github.io/exception-handling/core/exec/instructions.html#exec-memory-grow": {"displayText":"memory.grow","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"memory.grow","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/exec/instructions.html#exec-memory-grow"},
"https://webassembly.github.io/exception-handling/core/exec/numerics.html#aux-signed": {"displayText":"signed_64","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"signed_64","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/exec/numerics.html#aux-signed"},
"https://webassembly.github.io/exception-handling/core/exec/runtime.html#addresses": {"displayText":"address","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"address","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#addresses"},
"https://webassembly.github.io/exception-handling/core/exec/runtime.html#global-instances": {"displayText":"global instance","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"global instance","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#global-instances"},
"https://webassembly.github.io/exception-handling/core/exec/runtime.html#memory-instances": {"displayText":"memory instance","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"memory instance","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#memory-instances"},
"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externaddr": {"displayText":"extern address","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"extern address","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externaddr"},
"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externval": {"displayText":"external value","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"external value","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-externval"},
"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-frame": {"displayText":"module","export":true,"for_":["frame"],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"module","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-frame"},
"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-funcaddr": {"displayText":"function address","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"function address","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-funcaddr"},
"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-globaladdr": {"displayText":"global address","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"global address","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-globaladdr"},
"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-hostfunc": {"displayText":"host function","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"host function","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-hostfunc"},
"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-memaddr": {"displayText":"memory address","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"memory address","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-memaddr"},
"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-moduleinst": {"displayText":"memaddrs","export":true,"for_":["moduleinst"],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"memaddrs","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-moduleinst"},
"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-store": {"displayText":"store","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"store","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-store"},
"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-tableaddr": {"displayText":"table address","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"table address","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-tableaddr"},
"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-tagaddr": {"displayText":"tag address","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"tag address","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#syntax-tagaddr"},
"https://webassembly.github.io/exception-handling/core/exec/runtime.html#table-instances": {"displayText":"table instance","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"table instance","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#table-instances"},
"https://webassembly.github.io/exception-handling/core/exec/runtime.html#values": {"displayText":"i32.const","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"i32.const","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/exec/runtime.html#values"},
"https://webassembly.github.io/exception-handling/core/syntax/conventions.html#grammar-notation": {"displayText":"sequence","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"sequence","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/syntax/conventions.html#grammar-notation"},
"https://webassembly.github.io/exception-handling/core/syntax/modules.html#syntax-import": {"displayText":"import","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"import","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/syntax/modules.html#syntax-import"},
"https://webassembly.github.io/exception-handling/core/syntax/modules.html#syntax-module": {"displayText":"module","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"module","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/syntax/modules.html#syntax-module"},
"https://webassembly.github.io/exception-handling/core/syntax/types.html#external-types": {"displayText":"func","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"func","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#external-types"},
"https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-mut": {"displayText":"const","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"const","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-mut"},
"https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-numtype": {"displayText":"i64","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"i64","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-numtype"},
"https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-reftype": {"displayText":"reftype","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"reftype","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-reftype"},
"https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-tabletype": {"displayText":"table type","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"table type","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-tabletype"},
"https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-tagtype": {"displayText":"exception","export":true,"for_":["tagtype/attribute"],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"exception","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#syntax-tagtype"},
"https://webassembly.github.io/exception-handling/core/syntax/types.html#vector-types": {"displayText":"v128","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"v128","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/syntax/types.html#vector-types"},
"https://webassembly.github.io/exception-handling/core/syntax/values.html#syntax-float": {"displayText":"+\u221e","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"+\u221e","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/syntax/values.html#syntax-float"},
"https://webassembly.github.io/exception-handling/core/valid/modules.html#valid-module": {"displayText":"WebAssembly module validation","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly","spec":"webassembly","status":"anchor-block","text":"webassembly module validation","type":"dfn","url":"https://webassembly.github.io/exception-handling/core/valid/modules.html#valid-module"},
"https://webassembly.github.io/js-types/js-api/#abstract-opdef-fromvaluetype": {"displayText":"FromValueType","export":true,"for_":[],"level":"","normative":true,"shortname":"webassembly js api (js type reflection)","spec":"webassembly js api (js type reflection)","status":"anchor-block","text":"FromValueType","type":"abstract-op","url":"https://webassembly.github.io/js-types/js-api/#abstract-opdef-fromvaluetype"},
"https://webidl.spec.whatwg.org/#BufferSource": {"displayText":"BufferSource","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"BufferSource","type":"typedef","url":"https://webidl.spec.whatwg.org/#BufferSource"},
"https://webidl.spec.whatwg.org/#EnforceRange": {"displayText":"EnforceRange","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"EnforceRange","type":"extended-attribute","url":"https://webidl.spec.whatwg.org/#EnforceRange"},
"https://webidl.spec.whatwg.org/#Exposed": {"displayText":"Exposed","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"Exposed","type":"extended-attribute","url":"https://webidl.spec.whatwg.org/#Exposed"},
"https://webidl.spec.whatwg.org/#LegacyNamespace": {"displayText":"LegacyNamespace","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"LegacyNamespace","type":"extended-attribute","url":"https://webidl.spec.whatwg.org/#LegacyNamespace"},
"https://webidl.spec.whatwg.org/#a-new-promise": {"displayText":"a new promise","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"a new promise","type":"dfn","url":"https://webidl.spec.whatwg.org/#a-new-promise"},
"https://webidl.spec.whatwg.org/#dfn-associated-realm": {"displayText":"associated realm","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"associated realm","type":"dfn","url":"https://webidl.spec.whatwg.org/#dfn-associated-realm"},
"https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy": {"displayText":"get a copy of the buffer source","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"get a copy of the buffer source","type":"dfn","url":"https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy"},
"https://webidl.spec.whatwg.org/#dfn-namespace-object": {"displayText":"namespace object","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"namespace object","type":"dfn","url":"https://webidl.spec.whatwg.org/#dfn-namespace-object"},
"https://webidl.spec.whatwg.org/#idl-DOMString": {"displayText":"DOMString","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"DOMString","type":"interface","url":"https://webidl.spec.whatwg.org/#idl-DOMString"},
"https://webidl.spec.whatwg.org/#idl-USVString": {"displayText":"USVString","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"USVString","type":"interface","url":"https://webidl.spec.whatwg.org/#idl-USVString"},
"https://webidl.spec.whatwg.org/#idl-any": {"displayText":"any","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"any","type":"interface","url":"https://webidl.spec.whatwg.org/#idl-any"},
"https://webidl.spec.whatwg.org/#idl-boolean": {"displayText":"boolean","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"boolean","type":"interface","url":"https://webidl.spec.whatwg.org/#idl-boolean"},
"https://webidl.spec.whatwg.org/#idl-object": {"displayText":"object","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"object","type":"interface","url":"https://webidl.spec.whatwg.org/#idl-object"},
"https://webidl.spec.whatwg.org/#idl-promise": {"displayText":"Promise","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"Promise","type":"interface","url":"https://webidl.spec.whatwg.org/#idl-promise"},
"https://webidl.spec.whatwg.org/#idl-sequence": {"displayText":"sequence","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"sequence","type":"dfn","url":"https://webidl.spec.whatwg.org/#idl-sequence"},
"https://webidl.spec.whatwg.org/#idl-undefined": {"displayText":"undefined","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"undefined","type":"interface","url":"https://webidl.spec.whatwg.org/#idl-undefined"},
"https://webidl.spec.whatwg.org/#idl-unsigned-long": {"displayText":"unsigned long","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"unsigned long","type":"interface","url":"https://webidl.spec.whatwg.org/#idl-unsigned-long"},
"https://webidl.spec.whatwg.org/#implements": {"displayText":"implements","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"implements","type":"dfn","url":"https://webidl.spec.whatwg.org/#implements"},
"https://webidl.spec.whatwg.org/#new": {"displayText":"new","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"new","type":"dfn","url":"https://webidl.spec.whatwg.org/#new"},
"https://webidl.spec.whatwg.org/#reject": {"displayText":"reject","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"reject","type":"dfn","url":"https://webidl.spec.whatwg.org/#reject"},
"https://webidl.spec.whatwg.org/#resolve": {"displayText":"resolve","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"resolve","type":"dfn","url":"https://webidl.spec.whatwg.org/#resolve"},
"https://webidl.spec.whatwg.org/#upon-fulfillment": {"displayText":"upon fulfillment","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"upon fulfillment","type":"dfn","url":"https://webidl.spec.whatwg.org/#upon-fulfillment"},
"https://webidl.spec.whatwg.org/#upon-rejection": {"displayText":"upon rejection","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"upon rejection","type":"dfn","url":"https://webidl.spec.whatwg.org/#upon-rejection"},
};
function mkRefHint(link, ref) {
const linkText = link.textContent;
let dfnTextElements = '';
if (ref.displayText.toLowerCase() != linkText.toLowerCase()) {
// Give the original term if it's being displayed in a different way.
// But allow casing differences, they're insignificant.
dfnTextElements =
mk.li({},
mk.b({}, "Term: "),
mk.span({}, ref.displayText)
);
}
const forList = ref.for_;
let forListElements;
if(forList.length == 0) {
forListElements = [];
} else if(forList.length == 1) {
forListElements = mk.li({},
mk.b({}, "For: "),
mk.span({}, forList[0]),
);
} else {
forListElements = mk.li({},
mk.b({}, "For: "),
mk.ul({},
...forList.map(forItem =>
mk.li({},
mk.span({}, forItem)
),
),
),
);
}
const url = ref.url;
const safeUrl = encodeURIComponent(url);
const hintPanel = mk.aside({
class: "ref-hint",
id: `ref-hint-for-${safeUrl}`,
"data-for": url,
"aria-labelled-by": `ref-hint-for-${safeUrl}`,
},
mk.ul({},
dfnTextElements,
mk.li({},
mk.b({}, "URL: "),
mk.a({ href: url, class: "ref" }, url),
),
mk.li({},
mk.b({}, "Type: "),
mk.span({}, `${ref.type}`),
),
mk.li({},
mk.b({}, "Spec: "),
mk.span({}, `${ref.spec ? ref.spec : ''}`),
),
forListElements
),
);
hintPanel.forLink = link;
setupRefHintEventListeners(link, hintPanel);
return hintPanel;
}
function hideAllRefHints() {
queryAll(".ref-hint").forEach(el=>hideRefHint(el));
}
function hideRefHint(refHint) {
const link = refHint.forLink;
link.setAttribute("aria-expanded", "false");
if(refHint.teardownEventListeners) {
refHint.teardownEventListeners();
}
refHint.remove();
}
function showRefHint(link) {
if(link.classList.contains("dfn-link")) return;
const url = link.getAttribute("href");
const refHintKey = link.getAttribute("data-refhint-key");
let key = url;
if(refHintKey) {
key = refHintKey + "_" + url;
}
const ref = refsData[key];
if(!ref) return;
hideAllRefHints(); // Only display one at this time.
const refHint = mkRefHint(link, ref);
append(document.body, refHint);
link.setAttribute("aria-expanded", "true");
positionRefHint(refHint);
}
function setupRefHintEventListeners(link, refHint) {
if (refHint.teardownEventListeners) return;
// Add event handlers to hide the refHint after the user moves away
// from both the link and refHint, if not hovering either within one second.
let timeout = null;
const startHidingRefHint = (event) => {
if (timeout) {
clearTimeout(timeout);
}
timeout = setTimeout(() => {
hideRefHint(refHint);
}, 1000);
}
const resetHidingRefHint = (event) => {
if (timeout) clearTimeout(timeout);
timeout = null;
};
link.addEventListener("mouseleave", startHidingRefHint);
link.addEventListener("mouseenter", resetHidingRefHint);
link.addEventListener("blur", startHidingRefHint);
link.addEventListener("focus", resetHidingRefHint);
refHint.addEventListener("mouseleave", startHidingRefHint);
refHint.addEventListener("mouseenter", resetHidingRefHint);
refHint.addEventListener("blur", startHidingRefHint);
refHint.addEventListener("focus", resetHidingRefHint);
refHint.teardownEventListeners = () => {
// remove event listeners
resetHidingRefHint();
link.removeEventListener("mouseleave", startHidingRefHint);
link.removeEventListener("mouseenter", resetHidingRefHint);
link.removeEventListener("blur", startHidingRefHint);
link.removeEventListener("focus", resetHidingRefHint);
refHint.removeEventListener("mouseleave", startHidingRefHint);
refHint.removeEventListener("mouseenter", resetHidingRefHint);
refHint.removeEventListener("blur", startHidingRefHint);
refHint.removeEventListener("focus", resetHidingRefHint);
};
}
function positionRefHint(refHint) {
const link = refHint.forLink;
const linkPos = getBounds(link);
refHint.style.top = linkPos.bottom + "px";
refHint.style.left = linkPos.left + "px";
const panelPos = refHint.getBoundingClientRect();
const panelMargin = 8;
const maxRight = document.body.parentNode.clientWidth - panelMargin;
if (panelPos.right > maxRight) {
const overflowAmount = panelPos.right - maxRight;
const newLeft = Math.max(panelMargin, linkPos.left - overflowAmount);
refHint.style.left = newLeft + "px";
}
}
// TODO: shared util
// Returns the root-level absolute position {left and top} of element.
function getBounds(el, relativeTo=document.body) {
const relativeRect = relativeTo.getBoundingClientRect();
const elRect = el.getBoundingClientRect();
const top = elRect.top - relativeRect.top;
const left = elRect.left - relativeRect.left;
return {
top,
left,
bottom: top + elRect.height,
right: left + elRect.width,
}
}
function showRefHintListener(e) {
// If the target isn't in a link (or is a link),
// just ignore it.
let link = e.target.closest("a");
if(!link) return;
// If the target is in a ref-hint panel
// (aka a link in the already-open one),
// also just ignore it.
if(link.closest(".ref-hint")) return;
// Otherwise, show the panel for the link.
showRefHint(link);
}
function hideAllHintsListener(e) {
// If the click is inside a ref-hint panel, ignore it.
if(e.target.closest(".ref-hint")) return;
// Otherwise, close all the current panels.
hideAllRefHints();
}
document.addEventListener("DOMContentLoaded", () => {
document.body.addEventListener("mousedown", showRefHintListener);
document.body.addEventListener("focus", showRefHintListener);
document.body.addEventListener("click", hideAllHintsListener);
});
window.addEventListener("resize", () => {
// Hide any open ref hint.
hideAllRefHints();
});
}
</script>
<script>/* Boilerplate: script-var-click-highlighting */
"use strict";
{
/*
Color-choosing design:
* Colors are ordered by goodness.
* On clicking a var, give it the earliest color
with the lowest usage in the algorithm.
* On re-clicking, re-use the var's most recent color
if that's not currently being used elsewhere.
*/
const COLOR_COUNT = 7;
document.addEventListener("click", e=>{
if(e.target.nodeName == "VAR") {
highlightSameAlgoVars(e.target);
}
});
function highlightSameAlgoVars(v) {
// Find the algorithm container.
let algoContainer = findAlgoContainer(v);
// Not highlighting document-global vars,
// too likely to be unrelated.
if(algoContainer == null) return;
const varName = nameFromVar(v);
if(!v.hasAttribute("data-var-color")) {
const newColor = chooseHighlightColor(algoContainer, v);
for(const el of algoContainer.querySelectorAll("var")) {
if(nameFromVar(el) == varName) {
el.setAttribute("data-var-color", newColor);
el.setAttribute("data-var-last-color", newColor);
}
}
} else {
for(const el of algoContainer.querySelectorAll("var")) {
if(nameFromVar(el) == varName) {
el.removeAttribute("data-var-color");
}
}
}
}
function findAlgoContainer(el) {
while(el != document.body) {
if(el.hasAttribute("data-algorithm")) return el;
el = el.parentNode;
}
return null;
}
function nameFromVar(el) {
return el.textContent.replace(/(\s|\xa0)+/g, " ").trim();
}
function colorCountsFromContainer(container) {
const namesFromColor = Array.from({length:COLOR_COUNT}, x=>new Set());
for(let v of container.querySelectorAll("var[data-var-color]")) {
let color = +v.getAttribute("data-var-color");
namesFromColor[color].add(nameFromVar(v));
}
return namesFromColor.map(x=>x.size);
}
function leastUsedColor(colors) {
// Find the earliest color with the lowest count.
let minCount = Infinity;
let minColor = null;
for(var i = 0; i < colors.length; i++) {
if(colors[i] < minCount) {
minColor = i;
minCount = colors[i];
}
}
return minColor;
}
function chooseHighlightColor(container, v) {
const colorCounts = colorCountsFromContainer(container);
if(v.hasAttribute("data-var-last-color")) {
let color = +v.getAttribute("data-var-last-color");
if(colorCounts[color] == 0) return color;
}
return leastUsedColor(colorCounts);
}
}
</script>