Class CKEDITOR.eventInfo
Virtual class that illustrates the features of the event object to be
passed to event listeners by a CKEDITOR.event based object.
Defined in: core/eventInfo.js.
Constructor Attributes | Constructor Name and Description |
---|---|
(Virtual Class) Do not call this constructor.
|
Field Attributes | Field Name and Description |
---|---|
Any kind of additional data.
|
|
The editor instance that holds the sender.
|
|
Any extra data appended during the listener registration.
|
|
The event name.
|
|
The object that publishes (sends) the event.
|
Method Attributes | Method Name and Description |
---|---|
cancel()
Indicates that the event is to be cancelled (if cancelable).
|
|
Removes the current listener.
|
|
stop()
Indicates that no further listeners are to be called.
|
Class Detail
CKEDITOR.eventInfo()
Since:
3.0
(Virtual Class) Do not call this constructor. This class is not really part
of the API.
// Do not do this. var myEvent = new CKEDITOR.eventInfo(); // Error: CKEDITOR.eventInfo is undefined
Field Detail
{Object}
data
Since:
3.0
Any kind of additional data. Its format and usage is event dependent.
someObject.on( 'someEvent', function( event ) { alert( event.data ); // "Example" }); someObject.fire( 'someEvent', 'Example' );
{CKEDITOR.editor}
editor
Since:
3.0
The editor instance that holds the sender. May be the same as sender. May be
null if the sender is not part of an editor instance, like a component
running in standalone mode.
myButton.on( 'someEvent', function( event ) { alert( event.editor == myEditor ); // "true" }); myButton.fire( 'someEvent', null, myEditor );
{Object}
listenerData
Since:
3.0
Any extra data appended during the listener registration.
someObject.on( 'someEvent', function( event ) { alert( event.listenerData ); // "Example" } , null, 'Example' );
{String}
name
Since:
3.0
The event name.
someObject.on( 'someEvent', function( event ) { alert( event.name ); // "someEvent" }); someObject.fire( 'someEvent' );
{Object}
sender
Since:
3.0
The object that publishes (sends) the event.
someObject.on( 'someEvent', function( event ) { alert( event.sender == someObject ); // "true" }); someObject.fire( 'someEvent' );
Method Detail
{Undefined}
cancel()
Since:
3.0
Indicates that the event is to be cancelled (if cancelable).
someObject.on( 'someEvent', function( event ) { event.cancel(); }); someObject.on( 'someEvent', function( event ) { // This one will not be called. }); alert( someObject.fire( 'someEvent' ) ); // "true"
{Undefined}
removeListener()
Since:
3.0
Removes the current listener.
someObject.on( 'someEvent', function( event ) { event.removeListener(); // Now this function won't be called again by 'someEvent' });
{Undefined}
stop()
Since:
3.0
Indicates that no further listeners are to be called.
someObject.on( 'someEvent', function( event ) { event.stop(); }); someObject.on( 'someEvent', function( event ) { // This one will not be called. }); alert( someObject.fire( 'someEvent' ) ); // "false"