JavaScriptKit Documentation

Protocol Convertible​ToJSValue

public protocol ConvertibleToJSValue  

Objects that can be converted to a JavaScript value, preferably in a lossless manner.

%75 ConvertibleToJSValue ConvertibleToJSValue JSString JSString JSString->ConvertibleToJSValue TypedArrayElement TypedArrayElement TypedArrayElement->ConvertibleToJSValue

Types Conforming to Convertible​ToJSValue

TypedArrayElement

A protocol that allows a Swift numeric type to be mapped to the JavaScript TypedArray that holds integers of its type

JSString

JSString represents a string in JavaScript and supports bridging string between JavaScript and Swift.

Default Implementations

js​Value()

@available(*, deprecated, message: "Use the .jsValue property instead")
    public func jsValue() -> JSValue  

Requirements

js​Value

var jsValue: JSValue  

Create a JSValue that represents this object