Interface Event

All Known Subinterfaces:
AnimationEvent, AnimationPlaybackEvent, AudioProcessingEvent, BeforeUnloadEvent, BlobEvent, CloseEvent, CompositionEvent, CustomEvent, DeviceMotionEvent, DeviceOrientationEvent, DragEvent, ErrorEvent, ExtendableEvent, FocusEvent, GamepadEvent, HashChangeEvent, InputEvent, KeyboardEvent, MessageEvent, MouseEvent, MutationEvent, NotificationEvent, PageTransitionEvent, PointerEvent, PopStateEvent, ProgressEvent, StorageEvent, SubmitEvent, SVGEvent, SVGZoomEvent, TimeEvent, TouchEvent, TrackEvent, TransitionEvent, UIEvent, WheelEvent
All Known Implementing Classes:
AnimationEventImpl, AudioProcessingEventImpl, BeforeInstallPromptEventImpl, BeforeUnloadEventImpl, BlobEventImpl, CloseEventImpl, CompositionEventImpl, CustomEventImpl, DeviceMotionEventImpl, DeviceOrientationEventImpl, DragEventImpl, ErrorEventImpl, EventImpl, FocusEventImpl, GamepadEventimpl, HashChangeEventImpl, InputEventImpl, KeyboardEventImpl, MessageEventImpl, MouseEventImpl, MutationEventImpl, PageTransitionEventImpl, PointerEventImpl, PopStateEventImpl, ProgressEventImpl, StorageEventImpl, SubmitEventImpl, TouchEventImpl, TrackEventImpl, TransitionEventImpl, UIEventImpl, WheelEventImpl

public interface Event
The Event interface represents an event which takes place in the DOM.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final short
     
    static final short
     
    static final short
     
    static final short
     
  • Method Summary

    Modifier and Type
    Method
    Description
    The bubbles read-only property of the Event interface indicates whether the event bubbles up through the DOM or not.
    The cancelable read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.
    The read-only composed property of the Event interface returns a Boolean which indicates whether or not the event will propagate across the shadow DOM boundary into the standard DOM.
    The composedPath() method of the Event interface returns the event’s path which is an array of the objects on which listeners will be invoked.
    The currentTarget read-only property of the Event interface identifies the current target for the event, as the event traverses the DOM.
    The defaultPrevented read-only property of the Event interface returns a Boolean indicating whether or not the call to Event.preventDefault() canceled the event.
    short
    The eventPhase read-only property of the Event interface indicates which phase of the event flow is currently being evaluated.
     
    Initially implemented in Internet Explorer, Event.srcElement is a now-standard alias (defined in the DOM Standard but flagged as "historical") for the Event.target property.
    void
    The stopImmediatePropagation() method of the Event interface prevents other listeners of the same event from being called.
    void
    The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.
    The target property of the Event interface is a reference to the object onto which the event was dispatched.
    double
    The timeStamp read-only property of the Event interface returns the time (in milliseconds) at which the event was created.
    The isTrusted read-only property of the Event interface is a Boolean that is true when the event was generated by a user action, and false when the event was created or modified by a script or dispatched via EventTarget.dispatchEvent().
    The type read-only property of the Event interface returns a string containing the event's type.
    void
    The Event.initEvent() method is used to initialize the value of an event created using Document.createEvent().
    void
    initEvent(String type, Boolean bubbles)
    The Event.initEvent() method is used to initialize the value of an event created using Document.createEvent().
    void
    initEvent(String type, Boolean bubbles, boolean cancelable)
    The Event.initEvent() method is used to initialize the value of an event created using Document.createEvent().
    void
    The Event interface's preventDefault() method tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be.