Open rileyporter opened 2 years ago
Setting low priority unless this comes up as blocking for you.
Sounds good, I'll let you know if it becomes blocking. It's not blocking for now and I'm working on moving the new dart:html code outside of the sdk, so it may never become blocking.
I am hitting this issue on a personal project. Its quite annoying. Everything works fine in dart2js but ddc is impossible to use.
@KealJones This issue was is about unexpected compilation output under a very specific set of circumstances. In your personal project are you editing and compiling the dart:html library to add uses of JS interop and extension methods? If not could you file a separate issue with reproduction instructions?
The JavaScript generated by DDC for renamed extension members on JS interop classes when the classes are inside
dart:html
is incorrect. Instead of an extension member access likehtml['JSClassExt|get#externalGetter'](htmlObj)
, the JavaScript generated is ondart.global
likedart.global.OtherNameGetter(htmlObj)
. It seems like it's only an issue for external renamed extension members, and doesn't affect non-external extension members or external members that don't have a different@JS
name. It also doesn't affect top level members.As an example to repro, add this code to
dart:html
:And then provide the same classes outside of dart:html, e.g. in this
main.dart
:This generates the following
main
method in JS:It could be that this is true for any extensions of JS interop classes in
dart:*
libraries, and might be due to thisisJsMember
method?