Extend Javascript Class