Class CustomEvent

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, org.htmlunit.corejs.javascript.ConstProperties, org.htmlunit.corejs.javascript.debug.DebuggableObject, org.htmlunit.corejs.javascript.Scriptable, org.htmlunit.corejs.javascript.SymbolScriptable

    public class CustomEvent
    extends Event
    A JavaScript object for CustomEvent.
    See Also:
    Serialized Form
    • Field Detail

      • detail_

        private java.lang.Object detail_
        The data passed when initializing the event.
    • Constructor Detail

      • CustomEvent

        public CustomEvent()
        Default constructor.
    • Method Detail

      • jsConstructor

        public void jsConstructor​(java.lang.String type,
                                  org.htmlunit.corejs.javascript.ScriptableObject details)
        JavaScript constructor.
        Overrides:
        jsConstructor in class Event
        Parameters:
        type - the event type
        details - the event details (optional)
      • initCustomEvent

        public void initCustomEvent​(java.lang.String type,
                                    boolean bubbles,
                                    boolean cancelable,
                                    java.lang.Object detail)
        Implementation of the DOM Level 2 Event method for initializing the mouse event.
        Parameters:
        type - the event type
        bubbles - can the event bubble
        cancelable - can the event be canceled
        detail - the detail to set for the event
      • getDetail

        public java.lang.Object getDetail()
        Returns any data passed when initializing the event.
        Returns:
        any data passed when initializing the event