On this page
JsFunction class
A proxy on a JavaScript Function object.
Constructors
- JsFunction.withThis(Function f)
factory
-
Returns a JsFunction that captures its 'this' binding and calls
f
with the value of JavaScriptthis
passed as the first argument.
Properties
- hashCode → int
read-only, inherited
- The hash code for this object.
- runtimeType → Type
read-only, inherited
- A representation of the runtime type of the object.
Methods
- apply(
List args, {dynamic thisArg}) → dynamic -
Invokes the JavaScript function with arguments
args
. IfthisArg
is supplied it is the value ofthis
for the invocation. - callMethod(
Object method, [List? args]) → dynamic inherited -
Calls
method
on the JavaScript object with the argumentsargs
and returns the result. - deleteProperty(
Object property) → void inherited -
Removes
property
from the JavaScript object. - hasProperty(
Object property) → bool inherited -
Returns
true
if the JavaScript object contains the specified property either directly or though its prototype chain. - instanceof(
JsFunction type) → bool inherited -
Returns
true
if the JavaScript object hastype
in its prototype chain. - noSuchMethod(
Invocation invocation) → dynamic inherited - Invoked when a non-existent method or property is accessed.
- toString(
) → String inherited -
Returns the result of the JavaScript objects
toString
method.
Operators
- operator ==(
Object other) → bool inherited - The equality operator.
- operator [](
Object property) → dynamic inherited -
Returns the value associated with
property
from the proxied JavaScript object. - operator []=(
Object property, Object? value) → void inherited
© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.18.5/dart-js/JsFunction-class.html