// the events commence
if ( "_setup" in setup && typeof setup._setup === "function" ) {
+
+ // Resolves 239, 241, 242
+ options.target ||
+ ( setup.manifest.options.target &&
+ ( options.target = setup.manifest.options.target ) );
- setup._setup.call( this, options);
- Popcorn.extend( {}, options, {
- target: setup.manifest.options.target || ""
- });
+ setup._setup.call( this, options );
}
var p = Popcorn("#video"),
- expects = 2,
+ expects = 5,
+ run = 1,
count = 0;
function plus() {
}
},
_setup: function( options ) {
- ok( options.target, "`options.target exists`" );
- plus();
+ ok( options.target, "`options.target exists`" );
+ plus();
+
+ if ( run === 2 ) {
+ equals( options.target, 'custom-target', "Uses custom target if one is specified" );
+ plus();
+ }
+
+ if ( run === 1 ) {
+ equals( options.target, 'text-container', "Uses manifest target by default" );
+ plus();
+
+ run++;
+ }
},
start: function(event, options){
},
p.footnote({});
+ p.footnote({
+ target: "custom-target"
+ })
+
});