new(arguments:)
Instantiate an object from this function as a throwing constructor.
func new(arguments: [ConvertibleToJSValue]) throws -> JSObject
Parameters
- arguments
Arguments to be passed to this constructor function.
Returns
A new instance of this constructor.
Guaranteed to return an object because either:
a. the constructor explicitly returns an object, or
b. the constructor returns nothing, which causes JS to return the
this
value, orc. the constructor returns undefined, null or a non-object, in which case JS also returns
this
.