Code Index | File Index

Namespaces

Classes


Namespace CKEDITOR.tools

Utility functions.
Defined in: tools.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Utility functions.
Method Summary
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.
Namespace Detail
CKEDITOR.tools
Since: 3.0
Utility functions.
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

Documentation generated by JsDoc Toolkit 2.0.1 on Wed Jun 18 2008 00:23:53 GMT+0200 (CEST)