Super constructor call in the constructor of a Scala.js-defined JS class.
Exactly one such node must appear in the constructor of a
Scala.js-defined JS class, at the top-level (possibly as a direct child
of a top-level Block). Any other use of this node is invalid.
Statements before this node, as well as the args, cannot contain any
This() node. Statements after this node can use This().
After the execution of this node, it is guaranteed that all fields
declared in the current class have been created and initialized. Up to
that point, accessing any field declared in this class (e.g., through an
overridden method called from the super constructor) is undefined
behavior.
All in all, the shape of a constructor is therefore:
Super constructor call in the constructor of a Scala.js-defined JS class.
Exactly one such node must appear in the constructor of a Scala.js-defined JS class, at the top-level (possibly as a direct child of a top-level
Block
). Any other use of this node is invalid.Statements before this node, as well as the
args
, cannot contain anyThis()
node. Statements after this node can useThis()
.After the execution of this node, it is guaranteed that all fields declared in the current class have been created and initialized. Up to that point, accessing any field declared in this class (e.g., through an overridden method called from the super constructor) is undefined behavior.
All in all, the shape of a constructor is therefore:
which currently translates to something of the following shape: