utils/emittermixin
@ckeditor/ckeditor5-utils/src/emittermixin
Filtering
Interfaces
-
CallbackOptions
module:utils/emittermixin~CallbackOptions
-
Emitter
module:utils/emittermixin~Emitter
-
EmitterMixinDelegateChain
module:utils/emittermixin~EmitterMixinDelegateChain
Type Definitions
-
BaseEvent
module:utils/emittermixin~BaseEvent
-
GetCallback
module:utils/emittermixin~GetCallback
-
GetCallbackOptions
module:utils/emittermixin~GetCallbackOptions
-
GetEventInfo
module:utils/emittermixin~GetEventInfo
-
GetNameOrEventInfo
module:utils/emittermixin~GetNameOrEventInfo
Functions
-
EmitterMixin( base ) → Mixed<Base, Emitter>
module:utils/emittermixin~EmitterMixin:EXTENDS
Mixin that injects the events API into its host.
This function creates a class that inherits from the provided
base
and implementsEmitter
interface.class BaseClass { ... } class MyClass extends EmitterMixin( BaseClass ) { // This class derives from `BaseClass` and implements the `Emitter` interface. }
Read more about the concept of emitters in the:
- Event system and observables section of the Core editor architecture guide.
- Event system deep-dive guide.
Type parameters
Base : extends Constructor
Parameters
base : Base
Returns
-
EmitterMixin() → new () => Emitter
module:utils/emittermixin~EmitterMixin:NO_ARGUMENTS
Mixin that injects the events API into its host.
This function creates a class that implements
Emitter
interface.class MyClass extends EmitterMixin() { // This class implements the `Emitter` interface. }
Read more about the concept of emitters in the:
- Event system and observables section of the Core editor architecture guide.
- Event system deep dive guide.
Returns
new () => Emitter
-
Returns emitter's unique id.
Parameters
emitter : Emitter
An emitter which id will be returned.
Returns
string | undefined
-
internal
_getEmitterListenedTo( listeningEmitter, listenedToEmitterId ) → Emitter | null
module:utils/emittermixin~_getEmitterListenedTo
-
Sets emitter's unique id.
Note:
_emitterId
can be set only once.Parameters
emitter : Emitter
An emitter for which id will be set.
[ id ] : string
Unique id to set. If not passed, random unique id will be set.
Returns
void
Every day, we work hard to keep our documentation complete. Have you spotted outdated information? Is something missing? Please report it via our issue tracker.
With the release of version 42.0.0, we have rewritten much of our documentation to reflect the new import paths and features. We appreciate your feedback to help us ensure its accuracy and completeness.