Config class - A class for holding configuration data, with defaults and inheritance extension
class Config {
static clone( data ) {} // Object|Array
static merge( data, target, extend = false ) {} // void
static extendInheritance( extended ) {} // null|Object
constructor( defaults = {}, extended = [] ) {}
defaults : Object
data : Object
exposed : Object
get( name ) {} // *
set( name, value ) {} // void
merge( data, extend = false ) {} // void
require( ...names ) {} // Array
}
For more details check the Config source file.
Plugin class - Plugin class for use with the Plugins class
class Plugin {
constructor( options = {}, context = null, debug = null ) {}
options : Object
debug : null|Console
context : null|Object
_context_check( context ) {} // void
}
For more details check the Plugin source file.
Plugins class - A plugins handler class for use with the Plugin class
class Plugins {
constructor( plugins = [], context = null, append = true, debug = null ) {}
append : null|Boolean
debug : null|Console
context : null|Object
load( plugins ) {} // void
init( Construct, options = {}, replace = false ) {} // Object
runAsync( method, params = [], restrict = null ) {} // Promise[]
run( method, params = [], restrict = null ) {} // Object
exec( name, method, params = [], silent = false ) {} // *
get( name ) {} // null|Object
has( name ) {} // boolean
}
For more details check the Plugins source file.
Tracker class - A tracking helper class width condition and dynamic data
class Tracker {
static getData( tracker, params ) {} // TrackingData|Object
constructor( executor = null, debug = null ) {}
debug : null|Console
run( trackers, params = [] ) {} // void
ranOnceAlready( tracker, params = [] ) {} // boolean
clearOnce( group = null ) {} // void
}
For more details check the Tracker source file.
How to run a tracker.
tracker.run( [
{
trigger : ( tracker, arg1, arg2 ) => { return arg1 === 'argument'; },
once : 'event_name',
group : ( tracker, arg1, arg2 ) => {
return arg1 + arg2;
},
data : {
event : 'event_name',
dynamic : ( tracker, arg1, arg2 ) => {
return arg1.length + arg2.length;
},
},
},
], [ 'argument', 'argument...' ]);
Check the UiVideoPluginTracking class plugin of the UiVideoComponent for an implementation example.