// Provides some sugar, but ultimately extends
// the definition into Popcorn.p
-
- var reserved = [ "start", "end"],
+ var reserved = [ "start", "end" ],
plugin = {},
setup;
return this;
}
- // storing the plugin natives
+ // Storing the plugin natives
options._natives = setup;
options._natives.type = name;
options._running = false;
- // ensure a manifest object
+ // Ensure a manifest object, an empty object is a sufficient fallback
options._natives.manifest = manifest || setup.manifest || {};
// Checks for expected properties
// If a _setup was declared, then call it before
// the events commence
-
if ( "_setup" in setup && typeof setup._setup === "function" ) {
// Resolves 239, 241, 242
( "manifest" in setup && setup.manifest.options.target );
}
-
setup._setup.call( this, options );
}
-
Popcorn.addTrackEvent( this, options );
-
// Future support for plugin event definitions
// for all of the native events
Popcorn.forEach( setup, function ( callback, type ) {