dart:js_util library Null safety
Utility methods to manipulate package:js
annotated JavaScript interop
objects in cases where the name to call is not known at runtime.
You should only use these methods when the same effect cannot be achieved
with @JS()
annotations.
Functions
-
callConstructor<
T> (Object constr, List< Object?> ? arguments) → T -
callMethod<
T> (Object o, String method, List< Object?> args) → T -
getProperty<
T> (Object o, Object name) → T -
hasProperty(
Object o, Object name) → bool -
instanceof(
Object? o, Object type) → bool -
Check whether
o
is an instance oftype
. [...] -
jsify(
Object object) → dynamic - Recursively converts a JSON-like collection to JavaScript compatible representation. [...]
-
newObject<
T> () → T -
promiseToFuture<
T> (Object jsPromise) → Future< T> - Converts a JavaScript Promise to a Dart Future. [...]
-
setProperty<
T> (Object o, Object name, T? value) → T
Exceptions / Errors
- NullRejectionException
-
Exception for when the promise is rejected with a
null
orundefined
value. [...]