The type()
prototype method of the Tag
object can be used to get the sequence of data types associated with the tag.
The type()
prototype method of the Tag
object can be used to get the sequence of data types associated with the tag.
type()
None
An object with a property named parameters
that references the array of data types associated with this Tag
.
This is a copy of the type
object that was originally passed into the Tag()
constructor.
This code snippet creates a tag defining two data types and then exports them using type()
. The result is printed to the console:
const tag = new WebAssembly.Tag({ parameters: ["i32", "i64"] }); console.log(tag.type()); // Console output: // Object { parameters: (2) […] } // parameters: Array [ "i32", "i64" ] // <prototype>: Object { … }
Desktop | Mobile | Server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | Deno | Node.js | |
type |
95 |
95 |
100 |
No |
81 |
15.2 |
95 |
95 |
100 |
67 |
15.2 |
17.0 |
No |
17.0.0 |
© 2005–2022 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Tag/type