Initializerjavascriptkit 0.23.0JavaScriptKit
init(_:)
JSObject.swift:270init(_ base: JSObject)
init(_ base: JSObject)
import JavaScriptKit
@dynamicMemberLookup class JSThrowingObject
A JSObject
wrapper that enables throwing method calls capturing this
. Exceptions produced by JavaScript functions will be thrown as JSValue
.
@dynamicMemberLookup class JSObject
JSObject
represents an object in JavaScript and supports dynamic member lookup. Any member access like object.foo
will dynamically request the JavaScript and Swift runtime bridge library for a member with the specified name in this object.
subscript(name: String) -> ((ConvertibleToJSValue...) throws -> JSValue)? { get }
Returns the name
member method binding this object as this
context.
subscript(dynamicMember name: String) -> ((ConvertibleToJSValue...) throws -> JSValue)? { get }
A convenience method of subscript(_ name: String) -> ((ConvertibleToJSValue...) throws -> JSValue)?
to access the member through Dynamic Member Lookup.