if ( ( byStart[ idx ] && byStart[ idx ]._natives && byStart[ idx ]._natives.type === name ) &&
( byEnd[ idx ] && byEnd[ idx ]._natives && byEnd[ idx ]._natives.type === name ) ) {
+ byStart[ idx ]._natives._teardown && byStart[ idx ]._natives._teardown.call( obj, byStart[ idx ] );
+
byStart.splice( idx, 1 );
byEnd.splice( idx, 1 );
p2 = Popcorn("#video"),
rlen = Popcorn.registry.length,
count = 0,
- expects = 21,
+ expects = 23,
interval;
function plus() {
},
end: function () {
+ },
+ _teardown: function( options ) {
+ ok( true, "teardown called on " + options.order + " plugin via removePlugin()" );
+ plus();
}
});
p.removeme({
start: 2,
- end: 3
+ end: 3,
+ order: "first"
});
p2.removeme({
start: 2,
- end: 3
+ end: 3,
+ order: "second"
});
equals( Popcorn.registry.length, 1, "Popcorn.registry.length is 1");