WebAssembly.Tag.prototype.type()
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
The type() method of the Tag object can be used to get the sequence of data types associated with the tag.
Syntax
js
type()
Parameters
None
Return value
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.
Examples
This code snippet creates a tag defining two data types and then retrieves them using type():
js
const tag = new WebAssembly.Tag({ parameters: ["i32", "i64"] });
console.log(tag.type());
The object logged to the console will look like so:
js
{
parameters: ["i32", "i64"];
}
Specifications
| Specification |
|---|
| WebAssembly JavaScript Interface: Exception Handling> # dom-tag-tag-type-type> |