[js_interop]: "Uncaught TypeError: J.d5(...).Y is not a function" when importing "dart:js_util" library together #44150
Labels
area-web
Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop.
web-js-interop
Issues that impact all js interop
Dart version: 2.9.3~2.10.2
When using
@JS()
js_interop with a Dart class like Win injs_interop.dart
and importing the librarydart:js_util
inmain.dart
together, all the methods defined inside Win will be lost in Dart2JS compiler.For example,
main.dart
As you can see, if we comment out either line in the main function, it works well with Dart2JS compiler.
js_interop.dart
Here is a whole test project to demonstrate this issue - https://github.com/jumperchen/dart_interop_bug
The text was updated successfully, but these errors were encountered: