JSGlobalRef

org.scalajs.ir.Trees.JSGlobalRef
See theJSGlobalRef companion class
object JSGlobalRef

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

Tests whether the given name is a valid name for a JSGlobalRef.

Tests whether the given name is a valid name for a JSGlobalRef.

A name is valid iff it is a JavaScript identifier name (see isJSIdentifierName) and it is not reserved (see ReservedJSIdentifierNames).

Attributes

Concrete fields

Set of identifier names that can never be accessed from the global scope.

Set of identifier names that can never be accessed from the global scope.

This set includes and is limited to:

  • All ECMAScript 2015 keywords;
  • Identifier names that are treated as keywords or reserved identifier names in ECMAScript 2015 Strict Mode;
  • The identifier arguments, because any attempt to refer to it always refers to the magical arguments pseudo-array from the enclosing function, rather than a global variable.

This set does not contain await, although it is a reserved word within ES modules. It used to be allowed before 1.11.0, and even browsers do not seem to reject it. For compatibility reasons, we only warn about it at compile time, but the IR allows it.

Attributes