0 results found

tinymce.dom.ScriptLoader

Contribute to this page
Namespacetinymce.dom
ClassScriptLoader

This class handles asynchronous/synchronous loading of JavaScript files it will execute callbacks when various items gets loaded. This class is useful to load external JavaScript files.

Example

Public Methods

MethodDefined By
add(url:String, callback:function, scope:Object):void : Adds a specific script to the load queue of the script loader.ScriptLoader
isDone(url:String):Object : Returns true/false if a script has been loaded or not.ScriptLoader
load(url:String, callback:function, scope:Object):void : Loads a specific script directly without adding it to the load queue.ScriptLoader
loadQueue(callback:function, scope:Object):void : Starts the loading of the queue.ScriptLoader
loadScripts(scripts:Array, callback:function, scope:Object):void : Loads the specified queue of files and executes the callback ones they are loaded.ScriptLoader
markDone(u:string):void : Marks a specific script to be loaded.ScriptLoader

Method details

add

public function add(url:String, callback:function, scope:Object):void
Adds a specific script to the load queue of the script loader.

Parameters

ParamDetail
url:StringAbsolute URL to script to add.
callback:functionOptional callback function to execute ones this script gets loaded.
scope:ObjectOptional scope to execute callback in.

isDone

public function isDone(url:String):Object
Returns true/false if a script has been loaded or not.

Parameters

ParamDetail
url:StringURL to check for.

Returns
Object - [Boolean} true/false if the URL is loaded.

load

public function load(url:String, callback:function, scope:Object):void
Loads a specific script directly without adding it to the load queue.

Parameters

ParamDetail
url:StringAbsolute URL to script to add.
callback:functionOptional callback function to execute ones this script gets loaded.
scope:ObjectOptional scope to execute callback in.

loadQueue

public function loadQueue(callback:function, scope:Object):void
Starts the loading of the queue.

Parameters

ParamDetail
callback:functionOptional callback to execute when all queued items are loaded.
scope:ObjectOptional scope to execute the callback in.

loadScripts

public function loadScripts(scripts:Array, callback:function, scope:Object):void
Loads the specified queue of files and executes the callback ones they are loaded. This method is generally not used outside this class but it might be useful in some scenarios.

Parameters

ParamDetail
scripts:ArrayArray of queue items to load.
callback:functionOptional callback to execute ones all items are loaded.
scope:ObjectOptional scope to execute callback in.

markDone

public function markDone(u:string):void
Marks a specific script to be loaded. This can be useful if a script got loaded outside the script loader or to skip it from loading some script.

Parameters

ParamDetail
u:stringAbsolute URL to the script to mark as loaded.

Except as otherwise noted, the content of this page is licensed under the Creative Commons BY-NC-SA 3.0 License, and code samples are licensed under the Apache 2.0 License.