Namespace CKEDITOR.tools
Utility functions.
Defined in: tools.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Utility functions.
|
Method Attributes | Method Name and Description |
---|---|
<static> |
CKEDITOR.tools.each(object, callback, scope)
NO DOCUMENTATION AVAILABLE
|
<static> |
CKEDITOR.tools.extend(target, source, overwrite)
Copy the properties from one object to another.
|
<static> |
CKEDITOR.tools.globalEval(script, win)
Evaluates a script in a window (global) scope.
|
<static> |
CKEDITOR.tools.isArray(object)
NO DOCUMENTATION AVAILABLE
|
Method Detail
<static>
CKEDITOR.tools.each(object, callback, scope)
NO DOCUMENTATION AVAILABLE
NO EXAMPLE AVAILABLE
- Parameters:
- object
- callback
- scope
- Since:
- 3.0
<static>
{Object}
CKEDITOR.tools.extend(target, source, overwrite)
Copy the properties from one object to another. By default, properties
already present in the target object are not overwritten.
// Create the sample object. var myObject = { prop1 : true }; // Extend the above object with two properties. CKEDITOR.tools.extend( myObject, { prop2 : true, prop3 : true } ); // Alert "prop1", "prop2" and "prop3". for ( var p in myObject ) alert( p ) ;
- Parameters:
- {Object} target
- The object to be extended.
- {Object} source
- The object from which copy properties.
- {Boolean} overwrite Optional
- Indicates that properties already present in the target object must be overwritten.
- Since:
- 3.0
- Returns:
- {Object} the extended object (target).
<static>
{undefined}
CKEDITOR.tools.globalEval(script, win)
Evaluates a script in a window (global) scope.
var script = 'function sample() { alert( "Go!" ); }'; // Evaluates a script in the current window. CKEDITOR.tools.globalEval( script ); // Evaluates a script in the parent window. CKEDITOR.tools.globalEval( script, window.parent ); // Alerts "Go!" twice. window.sample(); window.parent.sample();
- Parameters:
- {String} script
- The script code to be evaluated.
- {Object} win Optional
- The target window. Defaults to the current window.
- Since:
- 3.0
<static>
CKEDITOR.tools.isArray(object)
NO DOCUMENTATION AVAILABLE
NO EXAMPLE AVAILABLE
- Parameters:
- object
- Since:
- 3.0