JSObject.fromInteropObject constructor - JSObject - dart:js_interop library (original) (raw)

description

JSObject.fromInteropObject(

  1. Object interopObject )

Creates a JSObject from an object provided by an earlier interop library.

Accepts, for example, the types created using package:js or dart:html.

This constructor is intended to allow users to avoid having to cast to and from JSObject.

Implementation

JSObject.fromInteropObject(Object interopObject)
  : _jsObject = interopObject as JSObjectRepType;