528 строки
8.3 KiB
HTML
528 строки
8.3 KiB
HTML
{{+bindTo:partials.standard_devtools_article}}
|
|
<h1>tot: DOMDebugger</h1>
|
|
<div>
|
|
<!-- TABLE OF CONTENTS -->
|
|
<div id="toc">
|
|
<div class="collapsible">
|
|
<h2>Contents</h2>
|
|
<ol>
|
|
|
|
<li>
|
|
<a href='#commands'">Commands</a>
|
|
<ol>
|
|
|
|
<li>
|
|
<a href="#command-removeDOMBreakpoint" href="#command-anchor">removeDOMBreakpoint</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#command-removeEventListenerBreakpoint" href="#command-anchor">removeEventListenerBreakpoint</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#command-removeXHRBreakpoint" href="#command-anchor">removeXHRBreakpoint</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#command-setDOMBreakpoint" href="#command-anchor">setDOMBreakpoint</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#command-setEventListenerBreakpoint" href="#command-anchor">setEventListenerBreakpoint</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#command-setXHRBreakpoint" href="#command-anchor">setXHRBreakpoint</a>
|
|
</li>
|
|
|
|
</ol>
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
<a href="#types">Types</a>
|
|
<ol>
|
|
|
|
<li>
|
|
<a href="#type-DOMBreakpointType">DOMBreakpointType</a>
|
|
</li>
|
|
|
|
</ol>
|
|
</li>
|
|
|
|
</ol>
|
|
</div><!-- /TABLE OF CONTENTS -->
|
|
<!-- API PAGE -->
|
|
<div>
|
|
|
|
<p>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.</p>
|
|
|
|
<!-- COMMANDS -->
|
|
|
|
<div class="protocol-group">
|
|
<a name="commands"></a>
|
|
<h3>Commands</h3>
|
|
|
|
<div class="protocol-item">
|
|
<a name="command-removeDOMBreakpoint"></a>
|
|
<h4>DOMDebugger.removeDOMBreakpoint</h4>
|
|
<div class="summary">
|
|
<!-- REQUEST -->
|
|
request: {<br>
|
|
"id": <number>,<br>
|
|
"method": "DOMDebugger.removeDOMBreakpoint",<br>
|
|
|
|
"params": {<br>
|
|
|
|
"<span class="specific">nodeId</span>": <<a href="dom.html#type-NodeId">DOM.NodeId</a>>,<br>
|
|
|
|
"<span class="specific">type</span>": <<a href="#type-DOMBreakpointType">DOMBreakpointType</a>><br>
|
|
|
|
}
|
|
|
|
<div>}</div>
|
|
<!-- RESPONSE -->
|
|
response: {<br>
|
|
"id": <number>,<br>
|
|
"error": <object>
|
|
|
|
<div>}</div>
|
|
</div>
|
|
<div class="description">
|
|
|
|
<p>Removes DOM breakpoint that was set using <code>setDOMBreakpoint</code>.</p>
|
|
|
|
|
|
<!-- PARAMETERS -->
|
|
<h4>Parameters</h4>
|
|
<div class="parameters">
|
|
|
|
<div><span class="value">
|
|
<strong>
|
|
<var>
|
|
|
|
nodeId
|
|
|
|
<!-- TYPE -->
|
|
<div style="display:inline">
|
|
(
|
|
|
|
|
|
<a href="dom.html#type-NodeId">DOM.NodeId</a>
|
|
|
|
)
|
|
</div>
|
|
</var>
|
|
</strong>
|
|
<div class="description">
|
|
Identifier of the node to remove breakpoint from.
|
|
|
|
</div>
|
|
</span>
|
|
</div>
|
|
|
|
<div><span class="value">
|
|
<strong>
|
|
<var>
|
|
|
|
type
|
|
|
|
<!-- TYPE -->
|
|
<div style="display:inline">
|
|
(
|
|
|
|
|
|
<a href="#type-DOMBreakpointType">DOMBreakpointType</a>
|
|
|
|
)
|
|
</div>
|
|
</var>
|
|
</strong>
|
|
<div class="description">
|
|
Type of the breakpoint to remove.
|
|
|
|
</div>
|
|
</span>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="protocol-item">
|
|
<a name="command-removeEventListenerBreakpoint"></a>
|
|
<h4>DOMDebugger.removeEventListenerBreakpoint</h4>
|
|
<div class="summary">
|
|
<!-- REQUEST -->
|
|
request: {<br>
|
|
"id": <number>,<br>
|
|
"method": "DOMDebugger.removeEventListenerBreakpoint",<br>
|
|
|
|
"params": {<br>
|
|
|
|
"<span class="specific">eventName</span>": <string><br>
|
|
|
|
}
|
|
|
|
<div>}</div>
|
|
<!-- RESPONSE -->
|
|
response: {<br>
|
|
"id": <number>,<br>
|
|
"error": <object>
|
|
|
|
<div>}</div>
|
|
</div>
|
|
<div class="description">
|
|
|
|
<p>Removes breakpoint on particular DOM event.</p>
|
|
|
|
|
|
<!-- PARAMETERS -->
|
|
<h4>Parameters</h4>
|
|
<div class="parameters">
|
|
|
|
<div><span class="value">
|
|
<strong>
|
|
<var>
|
|
|
|
eventName
|
|
|
|
<!-- TYPE -->
|
|
<div style="display:inline">
|
|
(
|
|
|
|
|
|
string
|
|
|
|
)
|
|
</div>
|
|
</var>
|
|
</strong>
|
|
<div class="description">
|
|
Event name.
|
|
|
|
</div>
|
|
</span>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="protocol-item">
|
|
<a name="command-removeXHRBreakpoint"></a>
|
|
<h4>DOMDebugger.removeXHRBreakpoint</h4>
|
|
<div class="summary">
|
|
<!-- REQUEST -->
|
|
request: {<br>
|
|
"id": <number>,<br>
|
|
"method": "DOMDebugger.removeXHRBreakpoint",<br>
|
|
|
|
"params": {<br>
|
|
|
|
"<span class="specific">url</span>": <string><br>
|
|
|
|
}
|
|
|
|
<div>}</div>
|
|
<!-- RESPONSE -->
|
|
response: {<br>
|
|
"id": <number>,<br>
|
|
"error": <object>
|
|
|
|
<div>}</div>
|
|
</div>
|
|
<div class="description">
|
|
|
|
<p>Removes breakpoint from XMLHttpRequest.</p>
|
|
|
|
|
|
<!-- PARAMETERS -->
|
|
<h4>Parameters</h4>
|
|
<div class="parameters">
|
|
|
|
<div><span class="value">
|
|
<strong>
|
|
<var>
|
|
|
|
url
|
|
|
|
<!-- TYPE -->
|
|
<div style="display:inline">
|
|
(
|
|
|
|
|
|
string
|
|
|
|
)
|
|
</div>
|
|
</var>
|
|
</strong>
|
|
<div class="description">
|
|
Resource URL substring.
|
|
|
|
</div>
|
|
</span>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="protocol-item">
|
|
<a name="command-setDOMBreakpoint"></a>
|
|
<h4>DOMDebugger.setDOMBreakpoint</h4>
|
|
<div class="summary">
|
|
<!-- REQUEST -->
|
|
request: {<br>
|
|
"id": <number>,<br>
|
|
"method": "DOMDebugger.setDOMBreakpoint",<br>
|
|
|
|
"params": {<br>
|
|
|
|
"<span class="specific">nodeId</span>": <<a href="dom.html#type-NodeId">DOM.NodeId</a>>,<br>
|
|
|
|
"<span class="specific">type</span>": <<a href="#type-DOMBreakpointType">DOMBreakpointType</a>><br>
|
|
|
|
}
|
|
|
|
<div>}</div>
|
|
<!-- RESPONSE -->
|
|
response: {<br>
|
|
"id": <number>,<br>
|
|
"error": <object>
|
|
|
|
<div>}</div>
|
|
</div>
|
|
<div class="description">
|
|
|
|
<p>Sets breakpoint on particular operation with DOM.</p>
|
|
|
|
|
|
<!-- PARAMETERS -->
|
|
<h4>Parameters</h4>
|
|
<div class="parameters">
|
|
|
|
<div><span class="value">
|
|
<strong>
|
|
<var>
|
|
|
|
nodeId
|
|
|
|
<!-- TYPE -->
|
|
<div style="display:inline">
|
|
(
|
|
|
|
|
|
<a href="dom.html#type-NodeId">DOM.NodeId</a>
|
|
|
|
)
|
|
</div>
|
|
</var>
|
|
</strong>
|
|
<div class="description">
|
|
Identifier of the node to set breakpoint on.
|
|
|
|
</div>
|
|
</span>
|
|
</div>
|
|
|
|
<div><span class="value">
|
|
<strong>
|
|
<var>
|
|
|
|
type
|
|
|
|
<!-- TYPE -->
|
|
<div style="display:inline">
|
|
(
|
|
|
|
|
|
<a href="#type-DOMBreakpointType">DOMBreakpointType</a>
|
|
|
|
)
|
|
</div>
|
|
</var>
|
|
</strong>
|
|
<div class="description">
|
|
Type of the operation to stop upon.
|
|
|
|
</div>
|
|
</span>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="protocol-item">
|
|
<a name="command-setEventListenerBreakpoint"></a>
|
|
<h4>DOMDebugger.setEventListenerBreakpoint</h4>
|
|
<div class="summary">
|
|
<!-- REQUEST -->
|
|
request: {<br>
|
|
"id": <number>,<br>
|
|
"method": "DOMDebugger.setEventListenerBreakpoint",<br>
|
|
|
|
"params": {<br>
|
|
|
|
"<span class="specific">eventName</span>": <string><br>
|
|
|
|
}
|
|
|
|
<div>}</div>
|
|
<!-- RESPONSE -->
|
|
response: {<br>
|
|
"id": <number>,<br>
|
|
"error": <object>
|
|
|
|
<div>}</div>
|
|
</div>
|
|
<div class="description">
|
|
|
|
<p>Sets breakpoint on particular DOM event.</p>
|
|
|
|
|
|
<!-- PARAMETERS -->
|
|
<h4>Parameters</h4>
|
|
<div class="parameters">
|
|
|
|
<div><span class="value">
|
|
<strong>
|
|
<var>
|
|
|
|
eventName
|
|
|
|
<!-- TYPE -->
|
|
<div style="display:inline">
|
|
(
|
|
|
|
|
|
string
|
|
|
|
)
|
|
</div>
|
|
</var>
|
|
</strong>
|
|
<div class="description">
|
|
DOM Event name to stop on (any DOM event will do).
|
|
|
|
</div>
|
|
</span>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="protocol-item">
|
|
<a name="command-setXHRBreakpoint"></a>
|
|
<h4>DOMDebugger.setXHRBreakpoint</h4>
|
|
<div class="summary">
|
|
<!-- REQUEST -->
|
|
request: {<br>
|
|
"id": <number>,<br>
|
|
"method": "DOMDebugger.setXHRBreakpoint",<br>
|
|
|
|
"params": {<br>
|
|
|
|
"<span class="specific">url</span>": <string><br>
|
|
|
|
}
|
|
|
|
<div>}</div>
|
|
<!-- RESPONSE -->
|
|
response: {<br>
|
|
"id": <number>,<br>
|
|
"error": <object>
|
|
|
|
<div>}</div>
|
|
</div>
|
|
<div class="description">
|
|
|
|
<p>Sets breakpoint on XMLHttpRequest.</p>
|
|
|
|
|
|
<!-- PARAMETERS -->
|
|
<h4>Parameters</h4>
|
|
<div class="parameters">
|
|
|
|
<div><span class="value">
|
|
<strong>
|
|
<var>
|
|
|
|
url
|
|
|
|
<!-- TYPE -->
|
|
<div style="display:inline">
|
|
(
|
|
|
|
|
|
string
|
|
|
|
)
|
|
</div>
|
|
</var>
|
|
</strong>
|
|
<div class="description">
|
|
Resource URL substring. All XHRs having this substring in the URL will get stopped upon.
|
|
|
|
</div>
|
|
</span>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<!-- for commands -->
|
|
</div>
|
|
<!-- if commands -->
|
|
<!-- EVENTS -->
|
|
<!-- if events -->
|
|
<!-- TYPES -->
|
|
|
|
<a name="types" id="types"></a>
|
|
<h3 id="types">Types</h3>
|
|
|
|
<div class="protocol-item">
|
|
<a name="type-DOMBreakpointType"></a>
|
|
<h4>DOMBreakpointType: <var>enumerated string</var></h4>
|
|
|
|
|
|
<div class="property">
|
|
[
|
|
|
|
"<strong><var>attribute-modified</var></strong>"
|
|
,
|
|
|
|
"<strong><var>node-removed</var></strong>"
|
|
,
|
|
|
|
"<strong><var>subtree-modified</var></strong>"
|
|
|
|
|
|
]
|
|
</div>
|
|
|
|
</div>
|
|
<!-- for types -->
|
|
</div>
|
|
<!-- if types -->
|
|
</div><!-- API PAGE -->
|
|
</div>
|
|
</div>
|
|
{{/partials.standard_devtools_article}}
|