src code

class method SGF.inherits

SGF.inherits(constructor, superConstructor) → undefined
  • constructor (Function) – A "constructor" Function that will inherit from superConstructor.
  • superConstructor (Function) – A "constructor" Function that constructor will inherit from.

Convienience function to make a "constructor" Function's prototype inherit from another "constructor" function.

In other words, after calling this:

(new constructor) instanceof superConstructor
    // true