From 8c2dcfe3fadfdd688b4fc1972061a2c203ec7b11 Mon Sep 17 00:00:00 2001 From: Luke Wagner Date: Fri, 13 Jan 2017 08:40:16 -0600 Subject: Add @@toStringTag to JS API prototypes (#944) --- JS.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'JS.md') 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) -- cgit v1.2.3