Referencing `super`

Brett Andrews brett.j.andrews at
Tue Aug 5 18:06:53 PDT 2014

Some differences/oddities I noticed between referencing and invoking
`super`. I briefly discussed this with Erik Arvidsson at In essence, if you
can invoke in two seperate ways, it seems logical that you should be able
to reference in those two ways (super() ~= super.submit(); super !=

class ClientForm extends Form{
  submit() {
    super.submit(); // Invokes Form.submit
    let superSubmit = super.submit; // Reference to Form.submit
    superSubmit(); // Invokes, but `this` is now undefined; not sure if

    super(); // Invokes Form.submit
    let superSubmit2 = super; // Error: "Unexpected token ;"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list