Make the tearOff return the correct function instead of a closure that returns the created object #48269
Labels
area-web-js
Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.
type-enhancement
A request for a change that isn't a bug
web-js-interop
Issues that impact all js interop
I am playing with webcomponents in Dart.
One way to be able to use webcomponents is making the underlying js class extend the implemented HTMLElement: #48261
Another way was if the tearOff in JS was the function with the constructor calls inside of it.
Example:
Today this results in this JS:
There is a high change that WebComponents could work if the js result was something like this:
Then we can use
Reflect.construct(HTMLElement, [], Foo___new_tearOff)
in webcomponentsThe text was updated successfully, but these errors were encountered: