JSObject.fromInteropObject constructor

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;