Class

DomEventData (engine/view/observer)

@ckeditor/ckeditor5-engine/src/view/observer/domeventdata

class

Information about a DOM event in context of the Document. It wraps the native event, which usually should not be used as the wrapper contains additional data (like key code for keyboard events).

Filtering

Type parameters

  • TEvent : extends Event = Event

    The type of DOM Event that this class represents.

Properties

  • readonly

    document : Document

    The instance of the document.

  • readonly

    domEvent : TEvent

    The DOM event.

  • readonly

    domTarget : HTMLElement

    The DOM target.

  • readonly

    target : Element

    The tree view element representing the target.

  • readonly

    view : View

    Instance of the view controller.

Methods

  • constructor( view, domEvent, [ additionalData ] )

    Type parameters

    TEvent : extends [object Object] = Event

    Parameters

    view : View

    The instance of the view controller.

    domEvent : TEvent

    The DOM event.

    [ additionalData ] : object

    Additional properties that the instance should contain.

  • preventDefault() → void

    Prevents the native's event default action.

    Returns

    void
  • stopPropagation() → void

    Stops native event propagation.

    Returns

    void