JSValue.makeBoolean constructor

JSValue.makeBoolean(
  1. JSContext context,
  2. bool boolean
)

Creates a JavaScript value of the boolean type. boolean The bool to assign to the newly created JSValue.

Implementation

JSValue.makeBoolean(this.context, bool boolean)
    : this.pointer = JSValueRef.jSValueMakeBoolean(
          context.pointer, boolean == true ? 1 : 0);