JSObject.fromInteropObject constructor

JSObject.fromInteropObject(
  1. Object interopObject
)

Constructor to go from an object from previous interop, like the types from package:js or dart:html, to JSObject.

This and the public representation field are intended to avoid users having to cast to and from JSObject.

Implementation

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