aboutsummaryrefslogtreecommitdiff
path: root/JS.md
diff options
context:
space:
mode:
authorLuke Wagner <mail@lukewagner.name>2017-01-13 08:40:16 -0600
committertitzer <titzer@google.com>2017-01-13 15:40:16 +0100
commit8c2dcfe3fadfdd688b4fc1972061a2c203ec7b11 (patch)
tree644e5f7afd94407934e3915b66aca34701a97743 /JS.md
parent593560156edf490c415f1e51762cec06c74b5537 (diff)
downloadnanowasm-design-8c2dcfe3fadfdd688b4fc1972061a2c203ec7b11.tar.gz
Add @@toStringTag to JS API prototypes (#944)
Diffstat (limited to 'JS.md')
-rw-r--r--JS.md35
1 files changed, 35 insertions, 0 deletions
diff --git a/JS.md b/JS.md
index 6258877..242ff93 100644
--- a/JS.md
+++ b/JS.md
@@ -36,6 +36,13 @@ the global object. Like the `Math` and `JSON` objects, the `WebAssembly` object
is a plain JS object (not a constructor or function) that acts like a namespace
and has the following properties:
+### `WebAssembly [ @@toStringTag ]` Property
+
+The initial value of the [`@@toStringTag`](https://tc39.github.io/ecma262/#sec-well-known-symbols)
+property is the String value `"WebAssembly"`.
+
+This property has the attributes { [[Writable]]: `false`, [[Enumerable]]: `false`, [[Configurable]]: `true` }.
+
### Constructor Properties of the `WebAssembly` object
The following intrinsic objects are added:
@@ -174,6 +181,13 @@ Otherwise, this function performs synchronous compilation of the `BufferSource`:
the validated `Ast.module`.
1. On failure, a new `WebAssembly.CompileError` is thrown.
+### `WebAssembly.Module.prototype [ @@toStringTag ]` Property
+
+The initial value of the [`@@toStringTag`](https://tc39.github.io/ecma262/#sec-well-known-symbols)
+property is the String value `"WebAssembly.Module"`.
+
+This property has the attributes { [[Writable]]: `false`, [[Enumerable]]: `false`, [[Configurable]]: `true` }.
+
### `WebAssembly.Module.exports`
The `exports` function has the signature:
@@ -433,6 +447,13 @@ Perform [`CreateDataProperty`](https://tc39.github.io/ecma262/#sec-createdatapro
Return `instanceObject`.
+### `WebAssembly.Instance.prototype [ @@toStringTag ]` Property
+
+The initial value of the [`@@toStringTag`](https://tc39.github.io/ecma262/#sec-well-known-symbols)
+property is the String value `"WebAssembly.Instance"`.
+
+This property has the attributes { [[Writable]]: `false`, [[Enumerable]]: `false`, [[Configurable]]: `true` }.
+
## Exported Function Exotic Objects
A function with [function index](Modules.md#function-index-space) `index`
@@ -534,6 +555,13 @@ the detachment performed by [`m.grow`](#webassemblymemoryprototypegrow) shall th
Return a new `WebAssembly.Memory` instance with [[Memory]] set to `m` and
[[BufferObject]] set to `buffer`.
+### `WebAssembly.Memory.prototype [ @@toStringTag ]` Property
+
+The initial value of the [`@@toStringTag`](https://tc39.github.io/ecma262/#sec-well-known-symbols)
+property is the String value `"WebAssembly.Memory"`.
+
+This property has the attributes { [[Writable]]: `false`, [[Enumerable]]: `false`, [[Configurable]]: `true` }.
+
### `WebAssembly.Memory.prototype.grow`
The `grow` method has the signature:
@@ -696,6 +724,13 @@ Set `T.[[Values]][i]` to `value`.
Return `undefined`.
+### `WebAssembly.Table.prototype [ @@toStringTag ]` Property
+
+The initial value of the [`@@toStringTag`](https://tc39.github.io/ecma262/#sec-well-known-symbols)
+property is the String value `"WebAssembly.Table"`.
+
+This property has the attributes { [[Writable]]: `false`, [[Enumerable]]: `false`, [[Configurable]]: `true` }.
+
## ToJSValue
To coerce a WebAssembly [`value`](https://github.com/WebAssembly/spec/blob/master/interpreter/spec/values.ml#L9)