You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/interoperability/global-scope.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -245,7 +245,7 @@ As a stop-gap measure, we point to the source code.
245
245
{% endcomment %}
246
246
247
247
The global variable `global` can of course be read with `js.Dynamic.global.global` (the double `global` is intended).
248
-
The global `this` can be read with [`js.special.globalThis`](https://github.com/scala-js/scala-js/blob/v1.0.0-M1/library/src/main/scala/scala/scalajs/js/special/package.scala#L40-L70).
248
+
The global `this` can be read with [`js.special.fileLevelThis`](https://github.com/scala-js/scala-js/blob/v1.0.0/library/src/main/scala/scala/scalajs/js/special/package.scala#L138-L170).
249
249
Together, these can be used to correctly detect the global scope in most environments:
250
250
251
251
{% highlight scala %}
@@ -256,7 +256,7 @@ val globalObject: js.Dynamic = {
256
256
g.global
257
257
} else {
258
258
// In all other well-known environment, we can use the global `this`
0 commit comments