Interface CustomEventParams

All Superinterfaces:
EventParams

public interface CustomEventParams extends EventParams
The parameters of the custom DOM event.
Since:
7.21
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.teamdev.jxbrowser.dom.event.EventParams

    EventParams.Builder
  • Method Summary

    Modifier and Type
    Method
    Description
    default <T> T
    Returns the payload of the custom event.
    default boolean
    Returns true if the event bubbles up through the DOM.
    default boolean
    Returns true if the event can be canceled, and therefore prevented as if the event never happened.
    default boolean
    Returns true if the event is trusted, and therefore was generated by a user action.
  • Method Details

    • isBubbles

      default boolean isBubbles()
      Description copied from interface: EventParams
      Returns true if the event bubbles up through the DOM.
      Specified by:
      isBubbles in interface EventParams
    • isCancelable

      default boolean isCancelable()
      Description copied from interface: EventParams
      Returns true if the event can be canceled, and therefore prevented as if the event never happened.
      Specified by:
      isCancelable in interface EventParams
    • isTrusted

      default boolean isTrusted()
      Description copied from interface: EventParams
      Returns true if the event is trusted, and therefore was generated by a user action.
      Specified by:
      isTrusted in interface EventParams
    • detail

      default <T> T detail()
      Returns the payload of the custom event.

      The type mapping rules are the following:

       | JavaScript         | Java           |
       |--------------------|----------------|
       | Number             | Double         |
       | String             | String         |
       | Boolean            | Boolean        |
       | null and undefined | null           |
       | Node               | JsObject, Node |
       | ArrayBuffer        | JsArrayBuffer  |
       | Array              | JsArray        |
       | Set                | JsSet          |
       | Map                | JsMap          |
       | Object             | JsObject       |
       | Proxy Object       | Object         |
       

      Proxy objects are mapped to the corresponding injected Java object.

      Type Parameters:
      T - the result type according to the type mapping rules
      Returns:
      the object from the detail field of the CustomEvent.