JSAnyUtilityExtension extension - dart:js_interop library (original) (raw)

Common utility functions that are useful for any JavaScript value.

on

Methods

dartify()→ Object?

Available on JSAny?, provided by the JSAnyUtilityExtension extension

Converts a JavaScript value to the Dart equivalent if possible.

instanceof(JSFunction constructor)→ bool

Available on JSAny?, provided by the JSAnyUtilityExtension extension

Whether this [JSAny](../dart-js%5Finterop/JSAny-extension-type.html)? is an instanceof constructor.

instanceOfString(String constructorName)→ bool

Available on JSAny?, provided by the JSAnyUtilityExtension extension

Whether this [JSAny](../dart-js%5Finterop/JSAny-extension-type.html)? is an instanceof the constructor that is defined by constructorName, which is looked up in theglobalContext.

isA<T extends JSAny?>()→ bool

Available on JSAny?, provided by the JSAnyUtilityExtension extension

Whether this [JSAny](../dart-js%5Finterop/JSAny-extension-type.html)? is an instance of the JavaScript type that is declared by T.

typeofEquals(String typeString)→ bool

Available on JSAny?, provided by the JSAnyUtilityExtension extension

Whether the result of typeof on this [JSAny](../dart-js%5Finterop/JSAny-extension-type.html)? istypeString.