extend.js
Methods
-
inner extend(superClass, subClassMethodsopt) → {function}
-
Used to subclass an existing class by emulating ES subclassing using the
extends
keyword.Parameters:
Name Type Attributes Default Description superClass
function The class to inherit from
subClassMethods
Object <optional>
{} Methods of the new class
Returns:
function -The new class with subClassMethods that inherited superClass.
Example
var MyComponent = videojs.extend(videojs.getComponent('Component'), { myCustomMethod: function() { // Do things in my method. } });