Domains Accessibility Animation ApplicationCache CSS CacheStorage Console DOM DOMDebugger DOMStorage Database Debugger DeviceOrientation Emulation FileSystem HeapProfiler IndexedDB Input Inspector LayerTree Memory Network Page Power Profiler Rendering Runtime ScreenOrientation Security ServiceWorker Timeline Tracing Worker
Chrome Debugger Protocol Viewer

DOMDebugger Domain

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.

Methods

setDOMBreakpoint

Sets breakpoint on particular operation with DOM.

Parameters
nodeId
DOM.NodeId Identifier of the node to set breakpoint on.
type
DOMBreakpointType Type of the operation to stop upon.

removeDOMBreakpoint

Removes DOM breakpoint that was set using setDOMBreakpoint.

Parameters
nodeId
DOM.NodeId Identifier of the node to remove breakpoint from.
type
DOMBreakpointType Type of the breakpoint to remove.

setEventListenerBreakpoint

Sets breakpoint on particular DOM event.

Parameters
eventName
string DOM Event name to stop on (any DOM event will do).
targetName
string EventTarget interface name to stop on. If equal to "*" or not provided, will stop on any EventTarget.

removeEventListenerBreakpoint

Removes breakpoint on particular DOM event.

Parameters
eventName
string Event name.
targetName
string EventTarget interface name.

setInstrumentationBreakpoint

Sets breakpoint on particular native event.

Parameters
eventName
string Instrumentation name to stop on.

removeInstrumentationBreakpoint

Removes breakpoint on particular native event.

Parameters
eventName
string Instrumentation name to stop on.

setXHRBreakpoint

Sets breakpoint on XMLHttpRequest.

Parameters
url
string Resource URL substring. All XHRs having this substring in the URL will get stopped upon.

removeXHRBreakpoint

Removes breakpoint from XMLHttpRequest.

Parameters
url
string Resource URL substring.

getEventListeners

Returns event listeners of the given object.

Parameters
objectId
Runtime.RemoteObjectId Identifier of the object to return listeners for.
Return object
listeners
array [ EventListener ] Array of relevant listeners.

Types

DOMBreakpointType

DOM breakpoint type.

Type: string

Allowed values

subtree-modified, attribute-modified, node-removed.

EventListener

Object event listener.

Type: object

Properties
type
string EventListener's type.
useCapture
boolean EventListener's useCapture.
location
Debugger.Location Handler code location.
handler
Runtime.RemoteObject Event handler function value.