You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: document/js-api/index.bs
+17Lines changed: 17 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1166,6 +1166,8 @@ The algorithm <dfn>ToWebAssemblyValue</dfn>(|v|, |type|) coerces a JavaScript va
1166
1166
1167
1167
<h3 id="tags">Tags</h3>
1168
1168
1169
+
The <dfn>tag_alloc</dfn>(|store|, |parameters|) algorithm creates a new [=tag address=] for |parameters| in |store| and returns the updated store and the [=tag address=].
1170
+
1169
1171
The <dfn>tag_parameters</dfn>(|store|, |tagAddress|) algorithm returns the [=list=] of types for |tagAddress| in |store|.
1170
1172
1171
1173
<h4 id="exceptions-types">Exception types</h4>
@@ -1210,6 +1212,21 @@ To <dfn>create a Tag object</dfn> from a [=tag address=] |tagAddress|, perform t
1210
1212
1211
1213
<div algorithm>
1212
1214
1215
+
The <dfn constructor for="Tag" lt="Tag(type)">new Tag(|type|)</dfn> constructor steps are:
1216
+
1217
+
1. Let |parameters| be |type|["parameters"].
1218
+
1. Let |wasmParameters| be «».
1219
+
1. [=list/iterate|For each=] |type| of |parameters|,
1220
+
1. [=list/Append=][=ToValueType=](|type|) to |wasmParameters|.
1221
+
1. Let |store| be the current agent's [=associated store=].
1222
+
1. Let (|store|, |tagAddress|) be [=tag_alloc=](|store|, |wasmParameters|).
1223
+
1. Set the current agent's [=associated store=] to |store|.
1224
+
1. [=initialize a Tag object|Initialize=] **this** from |tagAddress|.
1225
+
1226
+
</div>
1227
+
1228
+
<div algorithm>
1229
+
1213
1230
The <dfn method for="Tag">type()</dfn> method steps are:
1214
1231
1215
1232
1. Let |store| be the [=surrounding agent=]'s [=associated store=].
0 commit comments