Skip to content

Commit

Permalink
[#782] adding support for baseplayer nodelists in safari
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottDowne committed Nov 1, 2011
1 parent 87323b1 commit 3ff377d
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions popcorn.js
Expand Up @@ -1650,10 +1650,18 @@

basePlayer[ val ] = (function( value ) {

return function() {
// this is a stupid ugly kludgy hack in honour of Safari
// in Safari a NodeList is a function, not an object
if ( "length" in container[ value ] && !container[ value ].call ) {

return container[ value ].apply( container, arguments );
};
return container[ value ];
} else {

return function() {

return container[ value ].apply( container, arguments );
};
}
}( val ));
} else {

Expand Down

0 comments on commit 3ff377d

Please sign in to comment.