Module org.htmlunit

Class CustomEvent

java.lang.Object
org.htmlunit.corejs.javascript.SlotMapOwner<org.htmlunit.corejs.javascript.Scriptable>
org.htmlunit.corejs.javascript.ScriptableObject
All Implemented Interfaces:
Serializable, Cloneable, org.htmlunit.corejs.javascript.ConstProperties<org.htmlunit.corejs.javascript.Scriptable>, org.htmlunit.corejs.javascript.debug.DebuggableObject, org.htmlunit.corejs.javascript.PropHolder<org.htmlunit.corejs.javascript.Scriptable>, org.htmlunit.corejs.javascript.Scriptable, org.htmlunit.corejs.javascript.SymbolScriptable

public class CustomEvent extends Event
JavaScript host object for CustomEvent.
Author:
Ahmed Ashour, Ronald Brill
See Also:
  • Constructor Details

    • CustomEvent

      public CustomEvent()
  • Method Details

    • jsConstructor

      public void jsConstructor(String type, org.htmlunit.corejs.javascript.ScriptableObject details)
      Creates an instance of this event.
      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)
      Initializes the custom event.
      Parameters:
      type - the event type
      bubbles - whether the event bubbles
      cancelable - whether the event can be canceled
      detail - the custom detail data for the event
    • getDetail

      public Object getDetail()
      Returns any data passed when the event was initialized.
      Returns:
      any data passed when the event was initialized