dart-archive / web-components

Dart package providing the web components platform polyfills
https://pub.dartlang.org/packages/web_components
BSD 3-Clause "New" or "Revised" License
18 stars 10 forks source link

Make 'wrap' and 'unwrap' available to Dart #34

Open markhats opened 8 years ago

markhats commented 8 years ago

It would be great if wrap and unwrap were directly available to Dart. At the moment it is necessary to use js interop to call them. e.g.

Element wrappedActiveElement = js.context.callMethod('wrap', [document.activeElement]);

The wrapped form is useful (essential), for example, when comparing document.activeElement with an element returned via querySelector.