JsFunction class - dart:js library (original) (raw)

A proxy on a JavaScript Function object.

Inheritance

Constructors

JsFunction.withThis(Function f)

Returns a JsFunction that captures its 'this' binding and calls fwith the value of JavaScript this passed as the first argument.

factory

Properties

hashCodeint

The hash code for this object.

no setterinherited

runtimeTypeType

A representation of the runtime type of the object.

no setterinherited

Methods

apply(List args, {dynamic thisArg})→ dynamic

Invokes the JavaScript function with arguments args. If thisArg is supplied it is the value of this for the invocation.

callMethod(Object method, [List? args])→ dynamic

Calls method on the JavaScript object with the arguments args and returns the result.

inherited

deleteProperty(Object property)→ void

Removes property from the JavaScript object.

inherited

hasProperty(Object property)→ bool

Returns true if the JavaScript object contains the specified property either directly or though its prototype chain.

inherited

instanceof(JsFunction type)→ bool

Returns true if the JavaScript object has type in its prototype chain.

inherited

noSuchMethod(Invocation invocation)→ dynamic

Invoked when a nonexistent method or property is accessed.

inherited

toString()→ String

Returns the result of the JavaScript objects toString method.

inherited

Operators

operator ==(Object other)→ bool

The equality operator.

inherited

operator [](Object property)→ dynamic

Returns the value associated with property from the proxied JavaScript object.

inherited

operator []=(Object property, Object? value)→ void

inherited