Interface DOMDebugger

All Known Implementing Classes:
DOMDebuggerImpl

public interface DOMDebugger
DOM debugging allows setting breakpoints on particular DOM operations and events JavaScript execution will stop on these operations as if there was a regular breakpoint set
  • Method Details

    • getEventListeners

      java.util.List<EventListener> getEventListeners​(java.lang.String objectId, java.lang.Integer depth, java.lang.Boolean pierce)
      Returns event listeners of the given object.
      Parameters:
      objectId - Identifier of the object to return listeners for.
      depth - The maximum depth at which Node children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
      pierce - Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false). Reports listeners for all contexts if pierce is enabled.
      Returns:
      Array of relevant listeners.
    • removeDOMBreakpoint

      void removeDOMBreakpoint​(java.lang.Integer nodeId, DOMBreakpointType type)
      Removes DOM breakpoint that was set using `setDOMBreakpoint`.
      Parameters:
      nodeId - Identifier of the node to remove breakpoint from.
      type - Type of the breakpoint to remove.
    • removeEventListenerBreakpoint

      void removeEventListenerBreakpoint​(java.lang.String eventName, java.lang.String targetName)
      Removes breakpoint on particular DOM event.
      Parameters:
      eventName - Event name.
      targetName - EventTarget interface name.
    • removeInstrumentationBreakpoint

      void removeInstrumentationBreakpoint​(java.lang.String eventName)
      Removes breakpoint on particular native event.
      Parameters:
      eventName - Instrumentation name to stop on.
    • removeXHRBreakpoint

      void removeXHRBreakpoint​(java.lang.String url)
      Removes breakpoint from XMLHttpRequest.
      Parameters:
      url - Resource URL substring.
    • setDOMBreakpoint

      void setDOMBreakpoint​(java.lang.Integer nodeId, DOMBreakpointType type)
      Sets breakpoint on particular operation with DOM.
      Parameters:
      nodeId - Identifier of the node to set breakpoint on.
      type - Type of the operation to stop upon.
    • setEventListenerBreakpoint

      void setEventListenerBreakpoint​(java.lang.String eventName, java.lang.String targetName)
      Sets breakpoint on particular DOM event.
      Parameters:
      eventName - DOM Event name to stop on (any DOM event will do).
      targetName - EventTarget interface name to stop on. If equal to `"*"` or not provided, will stop on any EventTarget.
    • setInstrumentationBreakpoint

      void setInstrumentationBreakpoint​(java.lang.String eventName)
      Sets breakpoint on particular native event.
      Parameters:
      eventName - Instrumentation name to stop on.
    • setXHRBreakpoint

      void setXHRBreakpoint​(java.lang.String url)
      Sets breakpoint on XMLHttpRequest.
      Parameters:
      url - Resource URL substring. All XHRs having this substring in the URL will get stopped upon.
    • getEventListeners

      java.util.List<EventListener> getEventListeners​(java.lang.String objectId)
      Returns event listeners of the given object.
      Parameters:
      objectId - Identifier of the object to return listeners for.
      Returns:
      Array of relevant listeners.
    • removeEventListenerBreakpoint

      void removeEventListenerBreakpoint​(java.lang.String eventName)
      Removes breakpoint on particular DOM event.
      Parameters:
      eventName - Event name.
    • setEventListenerBreakpoint

      void setEventListenerBreakpoint​(java.lang.String eventName)
      Sets breakpoint on particular DOM event.
      Parameters:
      eventName - DOM Event name to stop on (any DOM event will do).