Movatterモバイル変換


[0]ホーム

URL:


  1. WebAssembly
  2. Reference
  3. WebAssembly
  4. WebAssembly.Tag
  5. WebAssembly.Tag() constructor

WebAssembly.Tag() constructor

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨May 2022⁩.

TheWebAssembly.Tag() constructor creates a newWebAssembly.Tag object.

Syntax

js
new WebAssembly.Tag(type)

Parameters

type

An object that can contain the following members:

parameters

An array ofdata types ("i32","i64","f32","f64","v128","externref","anyfunc").

Exceptions

TypeError

Thrown if at least one of these conditions are met:

  • Thetype parameter is not an object.
  • Thetype.parameters property is not supplied.
  • Thetype.parameters contains an unsupported data type.

Examples

This creates a tag with two values.

js
const tag = new WebAssembly.Tag({ parameters: ["i32", "i64"] });

Specifications

Specification
WebAssembly JavaScript Interface: Exception Handling
# dom-tag-tag-type-type

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp