mirror of
https://github.com/videojs/video.js.git
synced 2025-07-15 01:34:23 +02:00
@misteroneill rename "extends" to "extend" for ie8. closes #2624
This commit is contained in:
committed by
David LaPalomento
parent
a0b4293b82
commit
61a00db7cb
@ -228,7 +228,7 @@ test('component can be subclassed externally', function(){
|
||||
var Component = videojs.getComponent('Component');
|
||||
var ControlBar = videojs.getComponent('ControlBar');
|
||||
|
||||
var player = new (videojs.extends(Component, {
|
||||
var player = new (videojs.extend(Component, {
|
||||
reportUserActivity: function(){},
|
||||
textTracks: function(){ return {
|
||||
addEventListener: Function.prototype,
|
||||
@ -252,7 +252,7 @@ function testHelperMakeTag(){
|
||||
|
||||
test('should extend Component', function(){
|
||||
var Component = videojs.getComponent('Component');
|
||||
var MyComponent = videojs.extends(Component, {
|
||||
var MyComponent = videojs.extend(Component, {
|
||||
constructor: function() {
|
||||
this.bar = true;
|
||||
},
|
||||
@ -267,7 +267,7 @@ test('should extend Component', function(){
|
||||
ok(myComponent.bar, 'the constructor function is used');
|
||||
ok(myComponent.foo(), 'instance methods are applied');
|
||||
|
||||
var NoMethods = videojs.extends(Component);
|
||||
var NoMethods = videojs.extend(Component);
|
||||
var noMethods = new NoMethods({});
|
||||
ok(noMethods.on, 'should extend component with no methods or constructor');
|
||||
});
|
||||
|
Reference in New Issue
Block a user