TinyMCE:API/tinymce/extend

From Moxiecode Documentation Wiki

Jump to: navigation, search

Contents

Method: extend

Summary

Extends an object with the specified other object(s).

Syntax

<Object> extend(<Object> o, <Object eo> ..)

Parameters

o
Object to extend with new items.
eo
Object to extend the specified object with, multiple objects can be passed as arguments after this one.

Returns

o New extended object, same reference as the input object.

Examples

// Extends obj1 with two new fields
var obj = tinymce.extend(obj1, {
   somefield1 : 'a',
   somefield2 : 'a'
});

// Extends obj with obj2 and obj3
tinymce.extend(obj, obj2, obj3);
Personal tools