Skip to content

Prototype based Inheritance in JavaScript

Jay Adkisson edited this page Jun 19, 2012 · 2 revisions

Mathquill uses the Pjs framework for classical inheritance. You can use the function P to create classes like so:

var MyClass = P(function(_) {
  _.myMethod = function() { ... };
});

For more info, see the Pjs readme

Clone this wiki locally