Class CustomEvent

java.lang.Object
org.htmlunit.corejs.javascript.ScriptableObject
All Implemented Interfaces:
Serializable, 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:
  • Field Details

    • detail_

      private Object detail_
      The data passed when initializing the event.
  • Constructor Details

    • CustomEvent

      public CustomEvent()
      Default constructor.
  • Method Details

    • jsConstructor

      public void jsConstructor(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(String type, boolean bubbles, boolean cancelable, 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 Object getDetail()
      Returns any data passed when initializing the event.
      Returns:
      any data passed when initializing the event