unwrap<T extends Object> method

T unwrap<T extends Object>(
  1. JsObject value
)

Gets the Dart object carried by a wrapper from this environment.

The wrapper must have been created by defineClass; changing a JavaScript object's prototype does not make it a Dart instance.

Implementation

T unwrap<T extends Object>(JsObject value) {
  value._check();
  if (!identical(value._env, this)) throw ArgumentError('Wrong environment');
  return _unwrap<T>(value._handle);
}