Class $sf.pub.Config

Class Summary
Constructor Attributes Constructor Name and Description
 
Configure the base-level settings for the SafeFrames library Note that only one configuration can be active at a given time.

Class Detail

$sf.pub.Config(conf)
Configure the base-level settings for the SafeFrames library Note that only one configuration can be active at a given time. Therefore you cannot change the configuration by creating a new $sf.pub.Config while the SafeFrames library is busy (however you can add new position configurations). Instatiating a new config, when the library is not busy will destroy / remove all currently managed positions and there configurations.
Parameters:
{Object} conf
An object containing properties for configuration
{Boolean} conf.auto Optional
Whether or not to have SafeFrames automatically boostrap an render any SafeFrames tags within the page
{String} conf.cdn
The protocol,host name, and port parts of a URI, that is a 2ndary origin, used with SafeFrames to render content. For example JS files would be loaded from conf.cdn+"/"+conf.root+"/"+conf.version+"/[filename]"
{Boolean} conf.debug Optional
Whether or not debug mode is on or off
{String} conf.root
The root path part of the URI that is a 2ndary origin, used with SafeFrames to render content. For example the HTML file for rendering content into would beloaded from conf.cdn+"/"+conf.root+"/"+conf.version+"/"+conf.renderFile
{String} conf.renderFile
The filename (may also include path info), for which to render content into via a SafeFrame.
{String} conf.msgFile Optional
The filename (may also include path info), for which to use as a proxy for x-domain messaging whenever HTML5 messaging is not available. Only required if supporting older browsers.
{Number} conf.to Optional
The maximum amount of time in milliseconds to wait for a SafeFrame to finish rendering, defaults to 60 seconds.
{Function} conf.onBeforePosMsg Optional
A callback function that gets fired before any cancellable action is requested to be peformed from a a SafeFrame, such as expansion, etc. Return true out of this callback function to cancel/disallow the action in question.
{Function} conf.onPosMsg Optional
A callback function that gets fired when an action requested by a SafeFrame is performed
{Function} conf.onStartPosRender Optional
A callback function that gets fired when a SafeFrame starts to render 3rd party content.
{Function} conf.onEndPosRender Optional
A callback function that gets fired when a SafeFrame finishes rendering 3rd party content.
{Object} conf.positions Optional
A map of positions to automatically configure, where each key equals the id of the $sf.pub.PosConfig object, and the value is an object containing said object's settings.