Module

utils/mix

@ckeditor/ckeditor5-utils/src/mix

module

Filtering

Type Definitions

Functions

  • deprecated

    mix( baseClass, mixins ) → void

    Copies enumerable properties and symbols from the objects given as 2nd+ parameters to the prototype of first object (a constructor).

    class Editor {
    	...
    }
    
    const SomeMixin = {
    	a() {
    		return 'a';
    	}
    };
    
    mix( Editor, SomeMixin, ... );
    
    new Editor().a(); // -> 'a'
    

    Note: Properties which already exist in the base class will not be overriden.

    Parameters

    baseClass : Function

    Class which prototype will be extended.

    mixins : Array<object>

    Objects from which to get properties.

    Returns

    void