globalContext top-level property

JSObject get globalContext

The global scope that is used to find user-declared interop members.

For example:

library;

@JS()
external String get name;

Reading the top-level member name will execute JavaScript code like <globalContext>.name.

There are subtle differences depending on the compiler, but in general, globalContext can be treated like JavaScript's globalThis.

Implementation

external JSObject get globalContext;