StructuredCloneBuiltin

@Singleton
@Intrinsic(global = "structuredClone")
class StructuredCloneBuiltin : AbstractJsIntrinsic, ProxyExecutable

Structured Clone Built-in

Implements the structuredClone global function for JavaScript, which is used to create a deep copy of an object, usually for the purpose of transferring it between different execution contexts.

Standards Compliance

The Navigator structuredClone function is defined as part of the WinterTC Minimum Common API.

MDN

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Indicate whether this symbol is considered runtime-internal.

Functions

Link copied to clipboard
fun clone(value: Value, forContext: Context): Value
Link copied to clipboard
open override fun displayName(): String

Return the display name of this intrinsic; this is typically the Symbol bound to the value.

Link copied to clipboard
open override fun execute(vararg arguments: Value?): Any?
Link copied to clipboard

Install this intrinsic into the provided context bindings for a fresh context; this will only be called once per spawned context.

Link copied to clipboard
open override fun language(): GuestLanguage

Indicate the language which this intrinsic is intended to be used with.

Link copied to clipboard
open fun supports(language: GuestLanguage): Boolean

Indicate whether this intrinsic is intended to be used with a given guest language.

Link copied to clipboard
open override fun symbolicName(): String

Return the display name of this intrinsic; this is typically the Symbol bound to the value.