Interface NodeEventTarget

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addEventListenerNS​(java.lang.String namespaceURI, java.lang.String type, org.w3c.dom.events.EventListener listener, boolean useCapture, java.lang.Object evtGroup)
      This method allows the registration of an event listener in a specified group or the default group and, depending on the useCapture parameter, on the capture phase of the DOM event flow or its target and bubbling phases.
      boolean dispatchEvent​(org.w3c.dom.events.Event evt)
      This method allows the dispatch of events into the implementation's event model.
      EventSupport getEventSupport()
      Returns the event support instance for this node, or null if any.
      NodeEventTarget getParentNodeEventTarget()
      Returns the parent node event target.
      void removeEventListenerNS​(java.lang.String namespaceURI, java.lang.String type, org.w3c.dom.events.EventListener listener, boolean useCapture)
      This method allows the removal of an event listener, independently of the associated event group.
      • Methods inherited from interface org.w3c.dom.events.EventTarget

        addEventListener, removeEventListener
    • Method Detail

      • getEventSupport

        EventSupport getEventSupport()
        Returns the event support instance for this node, or null if any.
      • getParentNodeEventTarget

        NodeEventTarget getParentNodeEventTarget()
        Returns the parent node event target.
      • dispatchEvent

        boolean dispatchEvent​(org.w3c.dom.events.Event evt)
                       throws org.w3c.dom.events.EventException,
                              org.w3c.dom.DOMException
        This method allows the dispatch of events into the implementation's event model. The event target of the event is the EventTarget object on which dispatchEvent is called.
        Specified by:
        dispatchEvent in interface org.w3c.dom.events.EventTarget
        Parameters:
        evt - The event to be dispatched.
        Returns:
        Indicates whether any of the listeners which handled the event called Event.preventDefault(). If Event.preventDefault() was called the returned value is false, else it is true.
        Throws:
        org.w3c.dom.events.EventException - UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event.type was not specified by initializing the event before dispatchEvent was called. Specification of the Event.type as null or an empty string will also trigger this exception.
        DISPATCH_REQUEST_ERR: Raised if the Event object is already being dispatched.
        org.w3c.dom.DOMException - NOT_SUPPORTED_ERR: Raised if the Event object has not been created using DocumentEvent.createEvent().
        INVALID_CHARACTER_ERR: Raised if Event.type is not an NCName as defined in [XML Namespaces 1.1] .
      • addEventListenerNS

        void addEventListenerNS​(java.lang.String namespaceURI,
                                java.lang.String type,
                                org.w3c.dom.events.EventListener listener,
                                boolean useCapture,
                                java.lang.Object evtGroup)
        This method allows the registration of an event listener in a specified group or the default group and, depending on the useCapture parameter, on the capture phase of the DOM event flow or its target and bubbling phases.
        Parameters:
        namespaceURI - Specifies the Event.namespaceURI associated with the event for which the user is registering.
        type - Refer to the EventTarget.addEventListener() method for a description of this parameter.
        listener - Refer to the EventTarget.addEventListener() method for a description of this parameter.
        useCapture - Refer to the EventTarget.addEventListener() method for a description of this parameter.
        evtGroup - The object that represents the event group to associate with the EventListener (see also ). Use null to attach the event listener to the default group.
        Since:
        DOM Level 3
      • removeEventListenerNS

        void removeEventListenerNS​(java.lang.String namespaceURI,
                                   java.lang.String type,
                                   org.w3c.dom.events.EventListener listener,
                                   boolean useCapture)
        This method allows the removal of an event listener, independently of the associated event group. Calling removeEventListenerNS with arguments which do not identify any currently registered EventListener on the EventTarget has no effect.
        Parameters:
        namespaceURI - Specifies the Event.namespaceURI associated with the event for which the user registered the event listener.
        type - Refer to the EventTarget.removeEventListener() method for a description of this parameter.
        listener - Refer to the EventTarget.removeEventListener() method for a description of this parameter.
        useCapture - Refer to the EventTarget.removeEventListener() method for a description of this parameter.
        Since:
        DOM Level 3