dart2js using self
when it should (likely) use globalThis
#59982
Labels
area-web
Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop.
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
web-js-interop
Issues that impact all js interop
These docs: https://api.dart.dev/dart-js_interop/globalContext.html
Say
globalContext
can be treated like JS'sglobalThis
.But when compiling,
self
is used, which blows up inNode
.Replacing
self
withglobalThis
in the output fixes issues.Seeing this both in the use of
globalContext
fromjs_interop
and with the code generated withcreateJSInteropWrapper
The text was updated successfully, but these errors were encountered: