/
githubmirror
/
brackets
Обзор
Документация
Войти
/
githubmirror
/
brackets
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/LiveDevelopment/Inspector/inspector.html
8 222 строки
373 KB
JungGaBin
Edit typo ( inpspected -> inspected ) (#13940)
28 ноя 2017, 22:15
28 ноя 2017, 22:15
a154405
Код
Авторство
О чём код?
<!DOCTYPE html> <html> <head> <title>Inspector 1.1 Documentation</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script> <script src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script> <script> $(function () { var _domain = $(window.location.hash); if (_domain.length === 0) _domain = $("#toc"); $(".domain").hide(); _domain.show(); $(".dropdown-toggle").dropdown(); $("a[href^=#]").click(function (e) { e.preventDefault(); var domainAndName = e.currentTarget.hash.split("."); window.location = domainAndName[0]; var symbol = $(domainAndName.join("_")); var speed; if (_domain !== domainAndName[0]) { $(_domain).hide(); _domain = domainAndName[0]; $(_domain).show(); speed = 0; } else { speed = "fast"; } $("html, body").animate({ scrollTop: symbol.offset().top - 70 + "px" }, speed); if (domainAndName.length > 1) symbol.effect("highlight", { color: "#ffc"}, 1000); }); }); </script> <link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet"> <style> body {padding: 70px 0 20px 0;} h3, dl {font-family: Menlo, Monaco, "Courier New", monospace;} dl {font-size: 12.025px;} dl dd {margin-bottom: 6px;} dl .text {margin-left:12px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;} h3 {border-top: 1px solid #aaa; padding: 8px 0;} h3 .label {float: left; margin: 6px;} footer p {text-align: center; margin: 0;} </style> </head> <body> <div class="navbar navbar-fixed-top"> <div class="navbar-inner"> <div class="container"> <a href="#toc" class="brand">WebInspector v1.1</a> <ul class="nav nav-pills"> <li class="dropdown" id="domain-menu"> <a class="dropdown-toggle" data-toggle="dropdown">Domains<b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href='#ApplicationCache'>ApplicationCache</a></li> <li><a href='#CSS'>CSS</a></li> <li><a href='#Canvas'>Canvas</a></li> <li><a href='#Console'>Console</a></li> <li><a href='#DOM'>DOM</a></li> <li><a href='#DOMDebugger'>DOMDebugger</a></li> <li><a href='#DOMStorage'>DOMStorage</a></li> <li><a href='#Database'>Database</a></li> <li><a href='#Debugger'>Debugger</a></li> <li><a href='#FileSystem'>FileSystem</a></li> <li><a href='#HeapProfiler'>HeapProfiler</a></li> <li><a href='#IndexedDB'>IndexedDB</a></li> <li><a href='#Input'>Input</a></li> <li><a href='#Inspector'>Inspector</a></li> <li><a href='#LayerTree'>LayerTree</a></li> <li><a href='#Memory'>Memory</a></li> <li><a href='#Network'>Network</a></li> <li><a href='#Page'>Page</a></li> <li><a href='#Profiler'>Profiler</a></li> <li><a href='#Runtime'>Runtime</a></li> <li><a href='#Timeline'>Timeline</a></li> <li><a href='#Tracing'>Tracing</a></li> <li><a href='#Worker'>Worker</a></li> </ul> </li> </ul> </div> </div> </div> <div class='container'> <section id='toc' class='domain'> <h1>Table of Contents</h1> <h3><a href="#ApplicationCache">ApplicationCache</a></h3> <span class='label'>Type</span> <ul> <li><a href='#ApplicationCache.ApplicationCacheResource'>ApplicationCache.ApplicationCacheResource</a>: Detailed application cache resource information.</li> <li><a href='#ApplicationCache.ApplicationCache'>ApplicationCache.ApplicationCache</a>: Detailed application cache information.</li> <li><a href='#ApplicationCache.FrameWithManifest'>ApplicationCache.FrameWithManifest</a>: Frame identifier - manifest URL pair.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#ApplicationCache.getFramesWithManifests'>ApplicationCache.getFramesWithManifests</a>: Returns array of frame identifiers with manifest urls for each frame containing a document associated with some application cache.</li> <li><a href='#ApplicationCache.enable'>ApplicationCache.enable</a>: Enables application cache domain notifications.</li> <li><a href='#ApplicationCache.getManifestForFrame'>ApplicationCache.getManifestForFrame</a>: Returns manifest URL for document in the given frame.</li> <li><a href='#ApplicationCache.getApplicationCacheForFrame'>ApplicationCache.getApplicationCacheForFrame</a>: Returns relevant application cache data for the document in given frame.</li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#ApplicationCache.applicationCacheStatusUpdated'>ApplicationCache.applicationCacheStatusUpdated</a></li> <li><a href='#ApplicationCache.networkStateUpdated'>ApplicationCache.networkStateUpdated</a></li> </ul> <h3><a href="#CSS">CSS</a></h3> <span class='label'>Type</span> <ul> <li><a href='#CSS.StyleSheetId'>CSS.StyleSheetId</a></li> <li><a href='#CSS.CSSStyleId'>CSS.CSSStyleId</a>: This object identifies a CSS style in a unique way.</li> <li><a href='#CSS.StyleSheetOrigin'>CSS.StyleSheetOrigin</a>: Stylesheet type: "user" for user stylesheets, "user-agent" for user-agent stylesheets, "inspector" for stylesheets created by the inspector (i.e. those holding the "via inspector" rules), "regular" for regular stylesheets.</li> <li><a href='#CSS.CSSRuleId'>CSS.CSSRuleId</a>: This object identifies a CSS rule in a unique way.</li> <li><a href='#CSS.PseudoIdMatches'>CSS.PseudoIdMatches</a>: CSS rule collection for a single pseudo style.</li> <li><a href='#CSS.InheritedStyleEntry'>CSS.InheritedStyleEntry</a>: CSS rule collection for a single pseudo style.</li> <li><a href='#CSS.RuleMatch'>CSS.RuleMatch</a>: Match data for a CSS rule.</li> <li><a href='#CSS.SelectorList'>CSS.SelectorList</a>: Selector list data.</li> <li><a href='#CSS.CSSStyleAttribute'>CSS.CSSStyleAttribute</a>: CSS style information for a DOM style attribute.</li> <li><a href='#CSS.CSSStyleSheetHeader'>CSS.CSSStyleSheetHeader</a>: CSS stylesheet metainformation.</li> <li><a href='#CSS.CSSStyleSheetBody'>CSS.CSSStyleSheetBody</a>: CSS stylesheet contents.</li> <li><a href='#CSS.CSSRule'>CSS.CSSRule</a>: CSS rule representation.</li> <li><a href='#CSS.SourceRange'>CSS.SourceRange</a>: Text range within a resource. All numbers are zero-based.</li> <li><a href='#CSS.ShorthandEntry'>CSS.ShorthandEntry</a></li> <li><a href='#CSS.CSSPropertyInfo'>CSS.CSSPropertyInfo</a></li> <li><a href='#CSS.CSSComputedStyleProperty'>CSS.CSSComputedStyleProperty</a></li> <li><a href='#CSS.CSSStyle'>CSS.CSSStyle</a>: CSS style representation.</li> <li><a href='#CSS.CSSProperty'>CSS.CSSProperty</a>: CSS property declaration data.</li> <li><a href='#CSS.CSSMedia'>CSS.CSSMedia</a>: CSS media query descriptor.</li> <li><a href='#CSS.SelectorProfileEntry'>CSS.SelectorProfileEntry</a>: CSS selector profile entry.</li> <li><a href='#CSS.SelectorProfile'>CSS.SelectorProfile</a></li> <li><a href='#CSS.Region'>CSS.Region</a>: This object represents a region that flows from a Named Flow.</li> <li><a href='#CSS.NamedFlow'>CSS.NamedFlow</a>: This object represents a Named Flow.</li> <li><a href='#CSS.PlatformFontUsage'>CSS.PlatformFontUsage</a>: Information about amount of glyphs that were rendered with given font.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#CSS.enable'>CSS.enable</a>: Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been enabled until the result of this command is received.</li> <li><a href='#CSS.disable'>CSS.disable</a>: Disables the CSS agent for the given page.</li> <li><a href='#CSS.getMatchedStylesForNode'>CSS.getMatchedStylesForNode</a>: Returns requested styles for a DOM node identified by nodeId.</li> <li><a href='#CSS.getInlineStylesForNode'>CSS.getInlineStylesForNode</a>: Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM attributes) for a DOM node identified by nodeId.</li> <li><a href='#CSS.getComputedStyleForNode'>CSS.getComputedStyleForNode</a>: Returns the computed style for a DOM node identified by nodeId.</li> <li><a href='#CSS.getPlatformFontsForNode'>CSS.getPlatformFontsForNode</a>: Requests information about platform fonts which we used to render child TextNodes in the given node.</li> <li><a href='#CSS.getAllStyleSheets'>CSS.getAllStyleSheets</a>: Returns metainfo entries for all known stylesheets.</li> <li><a href='#CSS.getStyleSheet'>CSS.getStyleSheet</a>: Returns stylesheet data for the specified styleSheetId.</li> <li><a href='#CSS.getStyleSheetText'>CSS.getStyleSheetText</a>: Returns the current textual content and the URL for a stylesheet.</li> <li><a href='#CSS.setStyleSheetText'>CSS.setStyleSheetText</a>: Sets the new stylesheet text, thereby invalidating all existing CSSStyleId's and CSSRuleId's contained by this stylesheet.</li> <li><a href='#CSS.setStyleText'>CSS.setStyleText</a>: Updates the CSSStyleDeclaration text.</li> <li><a href='#CSS.setPropertyText'>CSS.setPropertyText</a>: Sets the new text for a property in the respective style, at offset propertyIndex. If overwrite is true, a property at the given offset is overwritten, otherwise inserted. text entirely replaces the property name: value.</li> <li><a href='#CSS.toggleProperty'>CSS.toggleProperty</a>: Toggles the property in the respective style, at offset propertyIndex. The disable parameter denotes whether the property should be disabled (i.e. removed from the style declaration). If disable == false, the property gets put back into its original place in the style declaration.</li> <li><a href='#CSS.setRuleSelector'>CSS.setRuleSelector</a>: Modifies the rule selector.</li> <li><a href='#CSS.addRule'>CSS.addRule</a>: Creates a new empty rule with the given selector in a special "inspector" stylesheet in the owner document of the context node.</li> <li><a href='#CSS.getSupportedCSSProperties'>CSS.getSupportedCSSProperties</a>: Returns all supported CSS property names.</li> <li><a href='#CSS.forcePseudoState'>CSS.forcePseudoState</a>: Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser.</li> <li><a href='#CSS.getNamedFlowCollection'>CSS.getNamedFlowCollection</a>: Returns the Named Flows from the document.</li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#CSS.mediaQueryResultChanged'>CSS.mediaQueryResultChanged</a>: Fires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features.</li> <li><a href='#CSS.styleSheetChanged'>CSS.styleSheetChanged</a>: Fired whenever a stylesheet is changed as a result of the client operation.</li> <li><a href='#CSS.styleSheetAdded'>CSS.styleSheetAdded</a>: Fired whenever an active document stylesheet is added.</li> <li><a href='#CSS.styleSheetRemoved'>CSS.styleSheetRemoved</a>: Fired whenever an active document stylesheet is removed.</li> <li><a href='#CSS.namedFlowCreated'>CSS.namedFlowCreated</a>: Fires when a Named Flow is created.</li> <li><a href='#CSS.namedFlowRemoved'>CSS.namedFlowRemoved</a>: Fires when a Named Flow is removed: has no associated content nodes and regions.</li> <li><a href='#CSS.regionLayoutUpdated'>CSS.regionLayoutUpdated</a>: Fires when a Named Flow's layout may have changed.</li> <li><a href='#CSS.regionOversetChanged'>CSS.regionOversetChanged</a>: Fires if any of the regionOverset values changed in a Named Flow's region chain.</li> </ul> <h3><a href="#Canvas">Canvas</a></h3> <span class='label'>Type</span> <ul> <li><a href='#Canvas.ResourceId'>Canvas.ResourceId</a>: Unique resource identifier.</li> <li><a href='#Canvas.ResourceStateDescriptor'>Canvas.ResourceStateDescriptor</a>: Resource state descriptor.</li> <li><a href='#Canvas.ResourceState'>Canvas.ResourceState</a>: Resource state.</li> <li><a href='#Canvas.CallArgument'>Canvas.CallArgument</a></li> <li><a href='#Canvas.Call'>Canvas.Call</a></li> <li><a href='#Canvas.TraceLogId'>Canvas.TraceLogId</a>: Unique trace log identifier.</li> <li><a href='#Canvas.TraceLog'>Canvas.TraceLog</a></li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#Canvas.enable'>Canvas.enable</a>: Enables Canvas inspection.</li> <li><a href='#Canvas.disable'>Canvas.disable</a>: Disables Canvas inspection.</li> <li><a href='#Canvas.dropTraceLog'>Canvas.dropTraceLog</a></li> <li><a href='#Canvas.hasUninstrumentedCanvases'>Canvas.hasUninstrumentedCanvases</a>: Checks if there is any uninstrumented canvas in the inspected page.</li> <li><a href='#Canvas.captureFrame'>Canvas.captureFrame</a>: Starts (or continues) a canvas frame capturing which will be stopped automatically after the next frame is prepared.</li> <li><a href='#Canvas.startCapturing'>Canvas.startCapturing</a>: Starts (or continues) consecutive canvas frames capturing. The capturing is stopped by the corresponding stopCapturing command.</li> <li><a href='#Canvas.stopCapturing'>Canvas.stopCapturing</a></li> <li><a href='#Canvas.getTraceLog'>Canvas.getTraceLog</a></li> <li><a href='#Canvas.replayTraceLog'>Canvas.replayTraceLog</a></li> <li><a href='#Canvas.getResourceState'>Canvas.getResourceState</a></li> <li><a href='#Canvas.evaluateTraceLogCallArgument'>Canvas.evaluateTraceLogCallArgument</a>: Evaluates a given trace call argument or its result.</li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#Canvas.contextCreated'>Canvas.contextCreated</a>: Fired when a canvas context has been created in the given frame. The context may not be instrumented (see hasUninstrumentedCanvases command).</li> <li><a href='#Canvas.traceLogsRemoved'>Canvas.traceLogsRemoved</a>: Fired when a set of trace logs were removed from the backend. If no parameters are given, all trace logs were removed.</li> </ul> <h3><a href="#Console">Console</a></h3> <span class='label'>Type</span> <ul> <li><a href='#Console.Timestamp'>Console.Timestamp</a>: Number of seconds since epoch.</li> <li><a href='#Console.ConsoleMessage'>Console.ConsoleMessage</a>: Console message.</li> <li><a href='#Console.CallFrame'>Console.CallFrame</a>: Stack entry for console errors and assertions.</li> <li><a href='#Console.StackTrace'>Console.StackTrace</a>: Call frames for assertions or error messages.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#Console.enable'>Console.enable</a>: Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification.</li> <li><a href='#Console.disable'>Console.disable</a>: Disables console domain, prevents further console messages from being reported to the client.</li> <li><a href='#Console.clearMessages'>Console.clearMessages</a>: Clears console messages collected in the browser.</li> <li><a href='#Console.setMonitoringXHREnabled'>Console.setMonitoringXHREnabled</a>: Toggles monitoring of XMLHttpRequest. If true, console will receive messages upon each XHR issued.</li> <li><a href='#Console.addInspectedNode'>Console.addInspectedNode</a>: Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).</li> <li><a href='#Console.addInspectedHeapObject'>Console.addInspectedHeapObject</a></li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#Console.messageAdded'>Console.messageAdded</a>: Issued when new console message is added.</li> <li><a href='#Console.messageRepeatCountUpdated'>Console.messageRepeatCountUpdated</a>: Issued when subsequent message(s) are equal to the previous one(s).</li> <li><a href='#Console.messagesCleared'>Console.messagesCleared</a>: Issued when console is cleared. This happens either upon clearMessages command or after page navigation.</li> </ul> <h3><a href="#DOM">DOM</a></h3> <span class='label'>Type</span> <ul> <li><a href='#DOM.NodeId'>DOM.NodeId</a>: Unique DOM node identifier.</li> <li><a href='#DOM.BackendNodeId'>DOM.BackendNodeId</a>: Unique DOM node identifier used to reference a node that may not have been pushed to the front-end.</li> <li><a href='#DOM.PseudoType'>DOM.PseudoType</a>: Pseudo element type.</li> <li><a href='#DOM.Node'>DOM.Node</a>: DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type.</li> <li><a href='#DOM.EventListener'>DOM.EventListener</a>: DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type.</li> <li><a href='#DOM.RGBA'>DOM.RGBA</a>: A structure holding an RGBA color.</li> <li><a href='#DOM.Quad'>DOM.Quad</a>: An array of quad vertices, x immediately followed by y for each point, points clock-wise.</li> <li><a href='#DOM.BoxModel'>DOM.BoxModel</a>: Box model.</li> <li><a href='#DOM.Rect'>DOM.Rect</a>: Rectangle.</li> <li><a href='#DOM.HighlightConfig'>DOM.HighlightConfig</a>: Configuration data for the highlighting of page elements.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#DOM.enable'>DOM.enable</a>: Enables DOM agent for the given page.</li> <li><a href='#DOM.disable'>DOM.disable</a>: Disables DOM agent for the given page.</li> <li><a href='#DOM.getDocument'>DOM.getDocument</a>: Returns the root DOM node to the caller.</li> <li><a href='#DOM.requestChildNodes'>DOM.requestChildNodes</a>: Requests that children of the node with given id are returned to the caller in form of setChildNodes events where not only immediate children are retrieved, but all children down to the specified depth.</li> <li><a href='#DOM.querySelector'>DOM.querySelector</a>: Executes querySelector on a given node.</li> <li><a href='#DOM.querySelectorAll'>DOM.querySelectorAll</a>: Executes querySelectorAll on a given node.</li> <li><a href='#DOM.setNodeName'>DOM.setNodeName</a>: Sets node name for a node with given id.</li> <li><a href='#DOM.setNodeValue'>DOM.setNodeValue</a>: Sets node value for a node with given id.</li> <li><a href='#DOM.removeNode'>DOM.removeNode</a>: Removes node with given id.</li> <li><a href='#DOM.setAttributeValue'>DOM.setAttributeValue</a>: Sets attribute for an element with given id.</li> <li><a href='#DOM.setAttributesAsText'>DOM.setAttributesAsText</a>: Sets attributes on element with given id. This method is useful when user edits some existing attribute value and types in several attribute name/value pairs.</li> <li><a href='#DOM.removeAttribute'>DOM.removeAttribute</a>: Removes attribute with given name from an element with given id.</li> <li><a href='#DOM.getEventListenersForNode'>DOM.getEventListenersForNode</a>: Returns event listeners relevant to the node.</li> <li><a href='#DOM.getOuterHTML'>DOM.getOuterHTML</a>: Returns node's HTML markup.</li> <li><a href='#DOM.setOuterHTML'>DOM.setOuterHTML</a>: Sets node HTML markup, returns new node id.</li> <li><a href='#DOM.performSearch'>DOM.performSearch</a>: Searches for a given string in the DOM tree. Use getSearchResults to access search results or cancelSearch to end this search session.</li> <li><a href='#DOM.getSearchResults'>DOM.getSearchResults</a>: Returns search results from given fromIndex to given toIndex from the sarch with the given identifier.</li> <li><a href='#DOM.discardSearchResults'>DOM.discardSearchResults</a>: Discards search results from the session with the given id. getSearchResults should no longer be called for that search.</li> <li><a href='#DOM.requestNode'>DOM.requestNode</a>: Requests that the node is sent to the caller given the JavaScript node object reference. All nodes that form the path from the node to the root are also sent to the client as a series of setChildNodes notifications.</li> <li><a href='#DOM.setInspectModeEnabled'>DOM.setInspectModeEnabled</a>: Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection.</li> <li><a href='#DOM.highlightRect'>DOM.highlightRect</a>: Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.</li> <li><a href='#DOM.highlightQuad'>DOM.highlightQuad</a>: Highlights given quad. Coordinates are absolute with respect to the main frame viewport.</li> <li><a href='#DOM.highlightNode'>DOM.highlightNode</a>: Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.</li> <li><a href='#DOM.hideHighlight'>DOM.hideHighlight</a>: Hides DOM node highlight.</li> <li><a href='#DOM.highlightFrame'>DOM.highlightFrame</a>: Highlights owner element of the frame with given id.</li> <li><a href='#DOM.pushNodeByPathToFrontend'>DOM.pushNodeByPathToFrontend</a>: Requests that the node is sent to the caller given its path. // FIXME, use XPath</li> <li><a href='#DOM.pushNodeByBackendIdToFrontend'>DOM.pushNodeByBackendIdToFrontend</a>: Requests that the node is sent to the caller given its backend node id.</li> <li><a href='#DOM.releaseBackendNodeIds'>DOM.releaseBackendNodeIds</a>: Requests that group of BackendNodeIds is released.</li> <li><a href='#DOM.resolveNode'>DOM.resolveNode</a>: Resolves JavaScript node object for given node id.</li> <li><a href='#DOM.getAttributes'>DOM.getAttributes</a>: Returns attributes for the specified node.</li> <li><a href='#DOM.moveTo'>DOM.moveTo</a>: Moves node into the new container, places it before the given anchor.</li> <li><a href='#DOM.undo'>DOM.undo</a>: Undoes the last performed action.</li> <li><a href='#DOM.redo'>DOM.redo</a>: Re-does the last undone action.</li> <li><a href='#DOM.markUndoableState'>DOM.markUndoableState</a>: Marks last undoable state.</li> <li><a href='#DOM.focus'>DOM.focus</a>: Focuses the given element.</li> <li><a href='#DOM.setFileInputFiles'>DOM.setFileInputFiles</a>: Sets files for the given file input element.</li> <li><a href='#DOM.getBoxModel'>DOM.getBoxModel</a>: Returns boxes for the currently selected nodes.</li> <li><a href='#DOM.getNodeForLocation'>DOM.getNodeForLocation</a>: Returns node id at given location.</li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#DOM.documentUpdated'>DOM.documentUpdated</a>: Fired when Document has been totally updated. Node ids are no longer valid.</li> <li><a href='#DOM.inspectNodeRequested'>DOM.inspectNodeRequested</a>: Fired when the node should be inspected. This happens after call to setInspectModeEnabled.</li> <li><a href='#DOM.setChildNodes'>DOM.setChildNodes</a>: Fired when backend wants to provide client with the missing DOM structure. This happens upon most of the calls requesting node ids.</li> <li><a href='#DOM.attributeModified'>DOM.attributeModified</a>: Fired when Element's attribute is modified.</li> <li><a href='#DOM.attributeRemoved'>DOM.attributeRemoved</a>: Fired when Element's attribute is removed.</li> <li><a href='#DOM.inlineStyleInvalidated'>DOM.inlineStyleInvalidated</a>: Fired when Element's inline style is modified via a CSS property modification.</li> <li><a href='#DOM.characterDataModified'>DOM.characterDataModified</a>: Mirrors DOMCharacterDataModified event.</li> <li><a href='#DOM.childNodeCountUpdated'>DOM.childNodeCountUpdated</a>: Fired when Container's child node count has changed.</li> <li><a href='#DOM.childNodeInserted'>DOM.childNodeInserted</a>: Mirrors DOMNodeInserted event.</li> <li><a href='#DOM.childNodeRemoved'>DOM.childNodeRemoved</a>: Mirrors DOMNodeRemoved event.</li> <li><a href='#DOM.shadowRootPushed'>DOM.shadowRootPushed</a>: Called when shadow root is pushed into the element.</li> <li><a href='#DOM.shadowRootPopped'>DOM.shadowRootPopped</a>: Called when shadow root is popped from the element.</li> <li><a href='#DOM.pseudoElementAdded'>DOM.pseudoElementAdded</a>: Called when a pseudo element is added to an element.</li> <li><a href='#DOM.pseudoElementRemoved'>DOM.pseudoElementRemoved</a>: Called when a pseudo element is removed from an element.</li> </ul> <h3><a href="#DOMDebugger">DOMDebugger</a></h3> <span class='label'>Type</span> <ul> <li><a href='#DOMDebugger.DOMBreakpointType'>DOMDebugger.DOMBreakpointType</a>: DOM breakpoint type.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#DOMDebugger.setDOMBreakpoint'>DOMDebugger.setDOMBreakpoint</a>: Sets breakpoint on particular operation with DOM.</li> <li><a href='#DOMDebugger.removeDOMBreakpoint'>DOMDebugger.removeDOMBreakpoint</a>: Removes DOM breakpoint that was set using setDOMBreakpoint.</li> <li><a href='#DOMDebugger.setEventListenerBreakpoint'>DOMDebugger.setEventListenerBreakpoint</a>: Sets breakpoint on particular DOM event.</li> <li><a href='#DOMDebugger.removeEventListenerBreakpoint'>DOMDebugger.removeEventListenerBreakpoint</a>: Removes breakpoint on particular DOM event.</li> <li><a href='#DOMDebugger.setInstrumentationBreakpoint'>DOMDebugger.setInstrumentationBreakpoint</a>: Sets breakpoint on particular native event.</li> <li><a href='#DOMDebugger.removeInstrumentationBreakpoint'>DOMDebugger.removeInstrumentationBreakpoint</a>: Removes breakpoint on particular native event.</li> <li><a href='#DOMDebugger.setXHRBreakpoint'>DOMDebugger.setXHRBreakpoint</a>: Sets breakpoint on XMLHttpRequest.</li> <li><a href='#DOMDebugger.removeXHRBreakpoint'>DOMDebugger.removeXHRBreakpoint</a>: Removes breakpoint from XMLHttpRequest.</li> </ul> <h3><a href="#DOMStorage">DOMStorage</a></h3> <span class='label'>Type</span> <ul> <li><a href='#DOMStorage.StorageId'>DOMStorage.StorageId</a>: DOM Storage identifier.</li> <li><a href='#DOMStorage.Item'>DOMStorage.Item</a>: DOM Storage item.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#DOMStorage.enable'>DOMStorage.enable</a>: Enables storage tracking, storage events will now be delivered to the client.</li> <li><a href='#DOMStorage.disable'>DOMStorage.disable</a>: Disables storage tracking, prevents storage events from being sent to the client.</li> <li><a href='#DOMStorage.getDOMStorageItems'>DOMStorage.getDOMStorageItems</a></li> <li><a href='#DOMStorage.setDOMStorageItem'>DOMStorage.setDOMStorageItem</a></li> <li><a href='#DOMStorage.removeDOMStorageItem'>DOMStorage.removeDOMStorageItem</a></li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#DOMStorage.domStorageItemsCleared'>DOMStorage.domStorageItemsCleared</a></li> <li><a href='#DOMStorage.domStorageItemRemoved'>DOMStorage.domStorageItemRemoved</a></li> <li><a href='#DOMStorage.domStorageItemAdded'>DOMStorage.domStorageItemAdded</a></li> <li><a href='#DOMStorage.domStorageItemUpdated'>DOMStorage.domStorageItemUpdated</a></li> </ul> <h3><a href="#Database">Database</a></h3> <span class='label'>Type</span> <ul> <li><a href='#Database.DatabaseId'>Database.DatabaseId</a>: Unique identifier of Database object.</li> <li><a href='#Database.Database'>Database.Database</a>: Database object.</li> <li><a href='#Database.Error'>Database.Error</a>: Database error.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#Database.enable'>Database.enable</a>: Enables database tracking, database events will now be delivered to the client.</li> <li><a href='#Database.disable'>Database.disable</a>: Disables database tracking, prevents database events from being sent to the client.</li> <li><a href='#Database.getDatabaseTableNames'>Database.getDatabaseTableNames</a></li> <li><a href='#Database.executeSQL'>Database.executeSQL</a></li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#Database.addDatabase'>Database.addDatabase</a></li> </ul> <h3><a href="#Debugger">Debugger</a></h3> <span class='label'>Type</span> <ul> <li><a href='#Debugger.BreakpointId'>Debugger.BreakpointId</a>: Breakpoint identifier.</li> <li><a href='#Debugger.ScriptId'>Debugger.ScriptId</a>: Unique script identifier.</li> <li><a href='#Debugger.CallFrameId'>Debugger.CallFrameId</a>: Call frame identifier.</li> <li><a href='#Debugger.Location'>Debugger.Location</a>: Location in the source code.</li> <li><a href='#Debugger.FunctionDetails'>Debugger.FunctionDetails</a>: Information about the function.</li> <li><a href='#Debugger.CallFrame'>Debugger.CallFrame</a>: JavaScript call frame. Array of call frames form the call stack.</li> <li><a href='#Debugger.Scope'>Debugger.Scope</a>: Scope description.</li> <li><a href='#Debugger.SetScriptSourceError'>Debugger.SetScriptSourceError</a>: Error data for setScriptSource command. compileError is a case type for uncompilable script source error.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#Debugger.enable'>Debugger.enable</a>: Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.</li> <li><a href='#Debugger.disable'>Debugger.disable</a>: Disables debugger for given page.</li> <li><a href='#Debugger.setBreakpointsActive'>Debugger.setBreakpointsActive</a>: Activates / deactivates all breakpoints on the page.</li> <li><a href='#Debugger.setSkipAllPauses'>Debugger.setSkipAllPauses</a>: Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).</li> <li><a href='#Debugger.setBreakpointByUrl'>Debugger.setBreakpointByUrl</a>: Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in locations property. Further matching script parsing will result in subsequent breakpointResolved events issued. This logical breakpoint will survive page reloads.</li> <li><a href='#Debugger.setBreakpoint'>Debugger.setBreakpoint</a>: Sets JavaScript breakpoint at a given location.</li> <li><a href='#Debugger.removeBreakpoint'>Debugger.removeBreakpoint</a>: Removes JavaScript breakpoint.</li> <li><a href='#Debugger.continueToLocation'>Debugger.continueToLocation</a>: Continues execution until specific location is reached.</li> <li><a href='#Debugger.stepOver'>Debugger.stepOver</a>: Steps over the statement.</li> <li><a href='#Debugger.stepInto'>Debugger.stepInto</a>: Steps into the function call.</li> <li><a href='#Debugger.stepOut'>Debugger.stepOut</a>: Steps out of the function call.</li> <li><a href='#Debugger.pause'>Debugger.pause</a>: Stops on the next JavaScript statement.</li> <li><a href='#Debugger.resume'>Debugger.resume</a>: Resumes JavaScript execution.</li> <li><a href='#Debugger.searchInContent'>Debugger.searchInContent</a>: Searches for given string in script content.</li> <li><a href='#Debugger.canSetScriptSource'>Debugger.canSetScriptSource</a>: Always returns true.</li> <li><a href='#Debugger.setScriptSource'>Debugger.setScriptSource</a>: Edits JavaScript source live.</li> <li><a href='#Debugger.restartFrame'>Debugger.restartFrame</a>: Restarts particular call frame from the beginning.</li> <li><a href='#Debugger.getScriptSource'>Debugger.getScriptSource</a>: Returns source for the script with given id.</li> <li><a href='#Debugger.getFunctionDetails'>Debugger.getFunctionDetails</a>: Returns detailed informtation on given function.</li> <li><a href='#Debugger.setPauseOnExceptions'>Debugger.setPauseOnExceptions</a>: Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is none.</li> <li><a href='#Debugger.evaluateOnCallFrame'>Debugger.evaluateOnCallFrame</a>: Evaluates expression on a given call frame.</li> <li><a href='#Debugger.compileScript'>Debugger.compileScript</a>: Compiles expression.</li> <li><a href='#Debugger.runScript'>Debugger.runScript</a>: Runs script with given id in a given context.</li> <li><a href='#Debugger.setOverlayMessage'>Debugger.setOverlayMessage</a>: Sets overlay message.</li> <li><a href='#Debugger.setVariableValue'>Debugger.setVariableValue</a>: Changes value of variable in a callframe or a closure. Either callframe or function must be specified. Object-based scopes are not supported and must be mutated manually.</li> <li><a href='#Debugger.getStepInPositions'>Debugger.getStepInPositions</a>: Lists all positions where step-in is possible for a current statement in a specified call frame</li> <li><a href='#Debugger.getBacktrace'>Debugger.getBacktrace</a>: Returns call stack including variables changed since VM was paused. VM must be paused.</li> <li><a href='#Debugger.skipStackFrames'>Debugger.skipStackFrames</a>: Makes backend skip steps in the sources with names matching given pattern. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.</li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#Debugger.globalObjectCleared'>Debugger.globalObjectCleared</a>: Called when global has been cleared and debugger client should reset its state. Happens upon navigation or reload.</li> <li><a href='#Debugger.scriptParsed'>Debugger.scriptParsed</a>: Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.</li> <li><a href='#Debugger.scriptFailedToParse'>Debugger.scriptFailedToParse</a>: Fired when virtual machine fails to parse the script.</li> <li><a href='#Debugger.breakpointResolved'>Debugger.breakpointResolved</a>: Fired when breakpoint is resolved to an actual script and location.</li> <li><a href='#Debugger.paused'>Debugger.paused</a>: Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.</li> <li><a href='#Debugger.resumed'>Debugger.resumed</a>: Fired when the virtual machine resumed execution.</li> </ul> <h3><a href="#FileSystem">FileSystem</a></h3> <span class='label'>Type</span> <ul> <li><a href='#FileSystem.Entry'>FileSystem.Entry</a>: Represents a browser side file or directory.</li> <li><a href='#FileSystem.Metadata'>FileSystem.Metadata</a>: Represents metadata of a file or entry.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#FileSystem.enable'>FileSystem.enable</a>: Enables events from backend.</li> <li><a href='#FileSystem.disable'>FileSystem.disable</a>: Disables events from backend.</li> <li><a href='#FileSystem.requestFileSystemRoot'>FileSystem.requestFileSystemRoot</a>: Returns root directory of the FileSystem, if exists.</li> <li><a href='#FileSystem.requestDirectoryContent'>FileSystem.requestDirectoryContent</a>: Returns content of the directory.</li> <li><a href='#FileSystem.requestMetadata'>FileSystem.requestMetadata</a>: Returns metadata of the entry.</li> <li><a href='#FileSystem.requestFileContent'>FileSystem.requestFileContent</a>: Returns content of the file. Result should be sliced into [start, end).</li> <li><a href='#FileSystem.deleteEntry'>FileSystem.deleteEntry</a>: Deletes specified entry. If the entry is a directory, the agent deletes children recursively.</li> </ul> <h3><a href="#HeapProfiler">HeapProfiler</a></h3> <span class='label'>Type</span> <ul> <li><a href='#HeapProfiler.ProfileHeader'>HeapProfiler.ProfileHeader</a>: Profile header.</li> <li><a href='#HeapProfiler.HeapSnapshotObjectId'>HeapProfiler.HeapSnapshotObjectId</a>: Heap snashot object id.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#HeapProfiler.getProfileHeaders'>HeapProfiler.getProfileHeaders</a></li> <li><a href='#HeapProfiler.startTrackingHeapObjects'>HeapProfiler.startTrackingHeapObjects</a></li> <li><a href='#HeapProfiler.stopTrackingHeapObjects'>HeapProfiler.stopTrackingHeapObjects</a></li> <li><a href='#HeapProfiler.getHeapSnapshot'>HeapProfiler.getHeapSnapshot</a></li> <li><a href='#HeapProfiler.removeProfile'>HeapProfiler.removeProfile</a></li> <li><a href='#HeapProfiler.clearProfiles'>HeapProfiler.clearProfiles</a></li> <li><a href='#HeapProfiler.takeHeapSnapshot'>HeapProfiler.takeHeapSnapshot</a></li> <li><a href='#HeapProfiler.collectGarbage'>HeapProfiler.collectGarbage</a></li> <li><a href='#HeapProfiler.getObjectByHeapObjectId'>HeapProfiler.getObjectByHeapObjectId</a></li> <li><a href='#HeapProfiler.getHeapObjectId'>HeapProfiler.getHeapObjectId</a></li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#HeapProfiler.addProfileHeader'>HeapProfiler.addProfileHeader</a></li> <li><a href='#HeapProfiler.addHeapSnapshotChunk'>HeapProfiler.addHeapSnapshotChunk</a></li> <li><a href='#HeapProfiler.finishHeapSnapshot'>HeapProfiler.finishHeapSnapshot</a></li> <li><a href='#HeapProfiler.resetProfiles'>HeapProfiler.resetProfiles</a></li> <li><a href='#HeapProfiler.reportHeapSnapshotProgress'>HeapProfiler.reportHeapSnapshotProgress</a></li> <li><a href='#HeapProfiler.lastSeenObjectId'>HeapProfiler.lastSeenObjectId</a>: If heap objects tracking has been started then backend regulary sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.</li> <li><a href='#HeapProfiler.heapStatsUpdate'>HeapProfiler.heapStatsUpdate</a>: If heap objects tracking has been started then backend may send update for one or more fragments</li> </ul> <h3><a href="#IndexedDB">IndexedDB</a></h3> <span class='label'>Type</span> <ul> <li><a href='#IndexedDB.DatabaseWithObjectStores'>IndexedDB.DatabaseWithObjectStores</a>: Database with an array of object stores.</li> <li><a href='#IndexedDB.ObjectStore'>IndexedDB.ObjectStore</a>: Object store.</li> <li><a href='#IndexedDB.ObjectStoreIndex'>IndexedDB.ObjectStoreIndex</a>: Object store index.</li> <li><a href='#IndexedDB.Key'>IndexedDB.Key</a>: Key.</li> <li><a href='#IndexedDB.KeyRange'>IndexedDB.KeyRange</a>: Key range.</li> <li><a href='#IndexedDB.DataEntry'>IndexedDB.DataEntry</a>: Data entry.</li> <li><a href='#IndexedDB.KeyPath'>IndexedDB.KeyPath</a>: Key path.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#IndexedDB.enable'>IndexedDB.enable</a>: Enables events from backend.</li> <li><a href='#IndexedDB.disable'>IndexedDB.disable</a>: Disables events from backend.</li> <li><a href='#IndexedDB.requestDatabaseNames'>IndexedDB.requestDatabaseNames</a>: Requests database names for given security origin.</li> <li><a href='#IndexedDB.requestDatabase'>IndexedDB.requestDatabase</a>: Requests database with given name in given frame.</li> <li><a href='#IndexedDB.requestData'>IndexedDB.requestData</a>: Requests data from object store or index.</li> <li><a href='#IndexedDB.clearObjectStore'>IndexedDB.clearObjectStore</a>: Clears all entries from an object store.</li> </ul> <h3><a href="#Input">Input</a></h3> <span class='label'>Type</span> <ul> <li><a href='#Input.TouchPoint'>Input.TouchPoint</a></li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#Input.dispatchKeyEvent'>Input.dispatchKeyEvent</a>: Dispatches a key event to the page.</li> <li><a href='#Input.dispatchMouseEvent'>Input.dispatchMouseEvent</a>: Dispatches a mouse event to the page.</li> <li><a href='#Input.dispatchTouchEvent'>Input.dispatchTouchEvent</a>: Dispatches a touch event to the page.</li> <li><a href='#Input.dispatchGestureEvent'>Input.dispatchGestureEvent</a>: Dispatches a gesture event to the page.</li> </ul> <h3><a href="#Inspector">Inspector</a></h3> <span class='label label-success'>Command</span> <ul> <li><a href='#Inspector.enable'>Inspector.enable</a>: Enables inspector domain notifications.</li> <li><a href='#Inspector.disable'>Inspector.disable</a>: Disables inspector domain notifications.</li> <li><a href='#Inspector.reset'>Inspector.reset</a>: Resets all domains.</li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#Inspector.evaluateForTestInFrontend'>Inspector.evaluateForTestInFrontend</a></li> <li><a href='#Inspector.inspect'>Inspector.inspect</a></li> <li><a href='#Inspector.detached'>Inspector.detached</a>: Fired when remote debugging connection is about to be terminated. Contains detach reason.</li> <li><a href='#Inspector.targetCrashed'>Inspector.targetCrashed</a>: Fired when debugging target has crashed</li> </ul> <h3><a href="#LayerTree">LayerTree</a></h3> <span class='label'>Type</span> <ul> <li><a href='#LayerTree.LayerId'>LayerTree.LayerId</a>: Unique RenderLayer identifier.</li> <li><a href='#LayerTree.Layer'>LayerTree.Layer</a>: Information about a compositing layer.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#LayerTree.enable'>LayerTree.enable</a>: Enables compositing tree inspection.</li> <li><a href='#LayerTree.disable'>LayerTree.disable</a>: Disables compositing tree inspection.</li> <li><a href='#LayerTree.getLayers'>LayerTree.getLayers</a>: Returns the layer tree structure of the current page.</li> <li><a href='#LayerTree.compositingReasons'>LayerTree.compositingReasons</a>: Provides the reasons why the given layer was composited.</li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#LayerTree.layerTreeDidChange'>LayerTree.layerTreeDidChange</a></li> </ul> <h3><a href="#Memory">Memory</a></h3> <span class='label'>Type</span> <ul> <li><a href='#Memory.MemoryBlock'>Memory.MemoryBlock</a></li> <li><a href='#Memory.HeapSnapshotChunk'>Memory.HeapSnapshotChunk</a></li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#Memory.getDOMCounters'>Memory.getDOMCounters</a></li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#Memory.addNativeSnapshotChunk'>Memory.addNativeSnapshotChunk</a></li> </ul> <h3><a href="#Network">Network</a></h3> <span class='label'>Type</span> <ul> <li><a href='#Network.LoaderId'>Network.LoaderId</a>: Unique loader identifier.</li> <li><a href='#Network.RequestId'>Network.RequestId</a>: Unique request identifier.</li> <li><a href='#Network.Timestamp'>Network.Timestamp</a>: Number of seconds since epoch.</li> <li><a href='#Network.Headers'>Network.Headers</a>: Request / response headers as keys / values of JSON object.</li> <li><a href='#Network.ResourceTiming'>Network.ResourceTiming</a>: Timing information for the request.</li> <li><a href='#Network.Request'>Network.Request</a>: HTTP request data.</li> <li><a href='#Network.Response'>Network.Response</a>: HTTP response data.</li> <li><a href='#Network.WebSocketRequest'>Network.WebSocketRequest</a>: WebSocket request data.</li> <li><a href='#Network.WebSocketResponse'>Network.WebSocketResponse</a>: WebSocket response data.</li> <li><a href='#Network.WebSocketFrame'>Network.WebSocketFrame</a>: WebSocket frame data.</li> <li><a href='#Network.CachedResource'>Network.CachedResource</a>: Information about the cached resource.</li> <li><a href='#Network.Initiator'>Network.Initiator</a>: Information about the request initiator.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#Network.enable'>Network.enable</a>: Enables network tracking, network events will now be delivered to the client.</li> <li><a href='#Network.disable'>Network.disable</a>: Disables network tracking, prevents network events from being sent to the client.</li> <li><a href='#Network.setUserAgentOverride'>Network.setUserAgentOverride</a>: Allows overriding user agent with the given string.</li> <li><a href='#Network.setExtraHTTPHeaders'>Network.setExtraHTTPHeaders</a>: Specifies whether to always send extra HTTP headers with the requests from this page.</li> <li><a href='#Network.getResponseBody'>Network.getResponseBody</a>: Returns content served for the given request.</li> <li><a href='#Network.replayXHR'>Network.replayXHR</a>: This method sends a new XMLHttpRequest which is identical to the original one. The following parameters should be identical: method, url, async, request body, extra headers, withCredentials attribute, user, password.</li> <li><a href='#Network.canClearBrowserCache'>Network.canClearBrowserCache</a>: Tells whether clearing browser cache is supported.</li> <li><a href='#Network.clearBrowserCache'>Network.clearBrowserCache</a>: Clears browser cache.</li> <li><a href='#Network.canClearBrowserCookies'>Network.canClearBrowserCookies</a>: Tells whether clearing browser cookies is supported.</li> <li><a href='#Network.clearBrowserCookies'>Network.clearBrowserCookies</a>: Clears browser cookies.</li> <li><a href='#Network.setCacheDisabled'>Network.setCacheDisabled</a>: Toggles ignoring cache for each request. If true, cache will not be used.</li> <li><a href='#Network.loadResourceForFrontend'>Network.loadResourceForFrontend</a>: Loads a resource in the context of a frame on the inspected page without cross origin checks.</li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#Network.requestWillBeSent'>Network.requestWillBeSent</a>: Fired when page is about to send HTTP request.</li> <li><a href='#Network.requestServedFromCache'>Network.requestServedFromCache</a>: Fired if request ended up loading from cache.</li> <li><a href='#Network.responseReceived'>Network.responseReceived</a>: Fired when HTTP response is available.</li> <li><a href='#Network.dataReceived'>Network.dataReceived</a>: Fired when data chunk was received over the network.</li> <li><a href='#Network.loadingFinished'>Network.loadingFinished</a>: Fired when HTTP request has finished loading.</li> <li><a href='#Network.loadingFailed'>Network.loadingFailed</a>: Fired when HTTP request has failed to load.</li> <li><a href='#Network.webSocketWillSendHandshakeRequest'>Network.webSocketWillSendHandshakeRequest</a>: Fired when WebSocket is about to initiate handshake.</li> <li><a href='#Network.webSocketHandshakeResponseReceived'>Network.webSocketHandshakeResponseReceived</a>: Fired when WebSocket handshake response becomes available.</li> <li><a href='#Network.webSocketCreated'>Network.webSocketCreated</a>: Fired upon WebSocket creation.</li> <li><a href='#Network.webSocketClosed'>Network.webSocketClosed</a>: Fired when WebSocket is closed.</li> <li><a href='#Network.webSocketFrameReceived'>Network.webSocketFrameReceived</a>: Fired when WebSocket frame is received.</li> <li><a href='#Network.webSocketFrameError'>Network.webSocketFrameError</a>: Fired when WebSocket frame error occurs.</li> <li><a href='#Network.webSocketFrameSent'>Network.webSocketFrameSent</a>: Fired when WebSocket frame is sent.</li> </ul> <h3><a href="#Page">Page</a></h3> <span class='label'>Type</span> <ul> <li><a href='#Page.ResourceType'>Page.ResourceType</a>: Resource type as it was perceived by the rendering engine.</li> <li><a href='#Page.FrameId'>Page.FrameId</a>: Unique frame identifier.</li> <li><a href='#Page.Frame'>Page.Frame</a>: Information about the Frame on the page.</li> <li><a href='#Page.FrameResourceTree'>Page.FrameResourceTree</a>: Information about the Frame hierarchy along with their cached resources.</li> <li><a href='#Page.SearchMatch'>Page.SearchMatch</a>: Search match for resource.</li> <li><a href='#Page.SearchResult'>Page.SearchResult</a>: Search result for resource.</li> <li><a href='#Page.Cookie'>Page.Cookie</a>: Cookie object</li> <li><a href='#Page.ScriptIdentifier'>Page.ScriptIdentifier</a>: Unique script identifier.</li> <li><a href='#Page.NavigationEntry'>Page.NavigationEntry</a>: Navigation history entry.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#Page.enable'>Page.enable</a>: Enables page domain notifications.</li> <li><a href='#Page.disable'>Page.disable</a>: Disables page domain notifications.</li> <li><a href='#Page.addScriptToEvaluateOnLoad'>Page.addScriptToEvaluateOnLoad</a></li> <li><a href='#Page.removeScriptToEvaluateOnLoad'>Page.removeScriptToEvaluateOnLoad</a></li> <li><a href='#Page.reload'>Page.reload</a>: Reloads given page optionally ignoring the cache.</li> <li><a href='#Page.navigate'>Page.navigate</a>: Navigates current page to the given URL.</li> <li><a href='#Page.getNavigationHistory'>Page.getNavigationHistory</a>: Returns navigation history for the current page.</li> <li><a href='#Page.navigateToHistoryEntry'>Page.navigateToHistoryEntry</a>: Navigates current page to the given history entry.</li> <li><a href='#Page.getCookies'>Page.getCookies</a>: Returns all browser cookies. Depending on the backend support, will either return detailed cookie information in the cookie field or string cookie representation using cookieString.</li> <li><a href='#Page.deleteCookie'>Page.deleteCookie</a>: Deletes browser cookie with given name, domain and path.</li> <li><a href='#Page.getResourceTree'>Page.getResourceTree</a>: Returns present frame / resource tree structure.</li> <li><a href='#Page.getResourceContent'>Page.getResourceContent</a>: Returns content of the given resource.</li> <li><a href='#Page.searchInResource'>Page.searchInResource</a>: Searches for given string in resource content.</li> <li><a href='#Page.searchInResources'>Page.searchInResources</a>: Searches for given string in frame / resource tree structure.</li> <li><a href='#Page.setDocumentContent'>Page.setDocumentContent</a>: Sets given markup as the document's HTML.</li> <li><a href='#Page.setDeviceMetricsOverride'>Page.setDeviceMetricsOverride</a>: Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results) and the font scale factor.</li> <li><a href='#Page.setShowPaintRects'>Page.setShowPaintRects</a>: Requests that backend shows paint rectangles</li> <li><a href='#Page.setShowDebugBorders'>Page.setShowDebugBorders</a>: Requests that backend shows debug borders on layers</li> <li><a href='#Page.setShowFPSCounter'>Page.setShowFPSCounter</a>: Requests that backend shows the FPS counter</li> <li><a href='#Page.setContinuousPaintingEnabled'>Page.setContinuousPaintingEnabled</a>: Requests that backend enables continuous painting</li> <li><a href='#Page.setShowScrollBottleneckRects'>Page.setShowScrollBottleneckRects</a>: Requests that backend shows scroll bottleneck rects</li> <li><a href='#Page.getScriptExecutionStatus'>Page.getScriptExecutionStatus</a>: Determines if scripts can be executed in the page.</li> <li><a href='#Page.setScriptExecutionDisabled'>Page.setScriptExecutionDisabled</a>: Switches script execution in the page.</li> <li><a href='#Page.setGeolocationOverride'>Page.setGeolocationOverride</a>: Overrides the Geolocation Position or Error.</li> <li><a href='#Page.clearGeolocationOverride'>Page.clearGeolocationOverride</a>: Clears the overriden Geolocation Position and Error.</li> <li><a href='#Page.setDeviceOrientationOverride'>Page.setDeviceOrientationOverride</a>: Overrides the Device Orientation.</li> <li><a href='#Page.clearDeviceOrientationOverride'>Page.clearDeviceOrientationOverride</a>: Clears the overridden Device Orientation.</li> <li><a href='#Page.setTouchEmulationEnabled'>Page.setTouchEmulationEnabled</a>: Toggles mouse event-based touch event emulation.</li> <li><a href='#Page.setEmulatedMedia'>Page.setEmulatedMedia</a>: Emulates the given media for CSS media queries.</li> <li><a href='#Page.captureScreenshot'>Page.captureScreenshot</a>: Capture page screenshot.</li> <li><a href='#Page.startScreencast'>Page.startScreencast</a>: Starts sending each frame using the screencastFrame event.</li> <li><a href='#Page.stopScreencast'>Page.stopScreencast</a>: Stops sending each frame in the screencastFrame.</li> <li><a href='#Page.handleJavaScriptDialog'>Page.handleJavaScriptDialog</a>: Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).</li> <li><a href='#Page.setShowViewportSizeOnResize'>Page.setShowViewportSizeOnResize</a>: Paints viewport size upon main frame resize.</li> <li><a href='#Page.setForceCompositingMode'>Page.setForceCompositingMode</a>: Force accelerated compositing mode for inspected page.</li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#Page.domContentEventFired'>Page.domContentEventFired</a></li> <li><a href='#Page.loadEventFired'>Page.loadEventFired</a></li> <li><a href='#Page.frameAttached'>Page.frameAttached</a>: Fired when frame has been attached to its parent.</li> <li><a href='#Page.frameNavigated'>Page.frameNavigated</a>: Fired once navigation of the frame has completed. Frame is now associated with the new loader.</li> <li><a href='#Page.frameDetached'>Page.frameDetached</a>: Fired when frame has been detached from its parent.</li> <li><a href='#Page.frameStartedLoading'>Page.frameStartedLoading</a>: Fired when frame has started loading.</li> <li><a href='#Page.frameStoppedLoading'>Page.frameStoppedLoading</a>: Fired when frame has stopped loading.</li> <li><a href='#Page.frameScheduledNavigation'>Page.frameScheduledNavigation</a>: Fired when frame schedules a potential navigation.</li> <li><a href='#Page.frameClearedScheduledNavigation'>Page.frameClearedScheduledNavigation</a>: Fired when frame no longer has a scheduled navigation.</li> <li><a href='#Page.javascriptDialogOpening'>Page.javascriptDialogOpening</a>: Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.</li> <li><a href='#Page.javascriptDialogClosed'>Page.javascriptDialogClosed</a>: Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.</li> <li><a href='#Page.scriptsEnabled'>Page.scriptsEnabled</a>: Fired when the JavaScript is enabled/disabled on the page</li> <li><a href='#Page.screencastFrame'>Page.screencastFrame</a>: Compressed image data requested by the startScreencast.</li> <li><a href='#Page.screencastVisibilityChanged'>Page.screencastVisibilityChanged</a>: Fired when the page with currently enabled screencast was shown or hidden .</li> </ul> <h3><a href="#Profiler">Profiler</a></h3> <span class='label'>Type</span> <ul> <li><a href='#Profiler.ProfileHeader'>Profiler.ProfileHeader</a>: Profile header.</li> <li><a href='#Profiler.CPUProfileNode'>Profiler.CPUProfileNode</a>: CPU Profile node. Holds callsite information, execution statistics and child nodes.</li> <li><a href='#Profiler.CPUProfile'>Profiler.CPUProfile</a>: Profile.</li> <li><a href='#Profiler.HeapSnapshotObjectId'>Profiler.HeapSnapshotObjectId</a>: Heap snashot object id.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#Profiler.enable'>Profiler.enable</a></li> <li><a href='#Profiler.disable'>Profiler.disable</a></li> <li><a href='#Profiler.setSamplingInterval'>Profiler.setSamplingInterval</a>: Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.</li> <li><a href='#Profiler.start'>Profiler.start</a></li> <li><a href='#Profiler.stop'>Profiler.stop</a></li> <li><a href='#Profiler.getProfileHeaders'>Profiler.getProfileHeaders</a></li> <li><a href='#Profiler.getCPUProfile'>Profiler.getCPUProfile</a></li> <li><a href='#Profiler.removeProfile'>Profiler.removeProfile</a></li> <li><a href='#Profiler.clearProfiles'>Profiler.clearProfiles</a></li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#Profiler.addProfileHeader'>Profiler.addProfileHeader</a></li> <li><a href='#Profiler.setRecordingProfile'>Profiler.setRecordingProfile</a></li> <li><a href='#Profiler.resetProfiles'>Profiler.resetProfiles</a></li> </ul> <h3><a href="#Runtime">Runtime</a></h3> <span class='label'>Type</span> <ul> <li><a href='#Runtime.RemoteObjectId'>Runtime.RemoteObjectId</a>: Unique object identifier.</li> <li><a href='#Runtime.RemoteObject'>Runtime.RemoteObject</a>: Mirror object referencing original JavaScript object.</li> <li><a href='#Runtime.ObjectPreview'>Runtime.ObjectPreview</a>: Object containing abbreviated remote object value.</li> <li><a href='#Runtime.PropertyPreview'>Runtime.PropertyPreview</a></li> <li><a href='#Runtime.PropertyDescriptor'>Runtime.PropertyDescriptor</a>: Object property descriptor.</li> <li><a href='#Runtime.InternalPropertyDescriptor'>Runtime.InternalPropertyDescriptor</a>: Object internal property descriptor. This property isn't normally visible in JavaScript code.</li> <li><a href='#Runtime.CallArgument'>Runtime.CallArgument</a>: Represents function call argument. Either remote object id objectId or primitive value or neither of (for undefined) them should be specified.</li> <li><a href='#Runtime.ExecutionContextId'>Runtime.ExecutionContextId</a>: Id of an execution context.</li> <li><a href='#Runtime.ExecutionContextDescription'>Runtime.ExecutionContextDescription</a>: Description of an isolated world.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#Runtime.evaluate'>Runtime.evaluate</a>: Evaluates expression on global object.</li> <li><a href='#Runtime.callFunctionOn'>Runtime.callFunctionOn</a>: Calls function with given declaration on the given object. Object group of the result is inherited from the target object.</li> <li><a href='#Runtime.getProperties'>Runtime.getProperties</a>: Returns properties of a given object. Object group of the result is inherited from the target object.</li> <li><a href='#Runtime.releaseObject'>Runtime.releaseObject</a>: Releases remote object with given id.</li> <li><a href='#Runtime.releaseObjectGroup'>Runtime.releaseObjectGroup</a>: Releases all remote objects that belong to a given group.</li> <li><a href='#Runtime.run'>Runtime.run</a>: Tells inspected instance(worker or page) that it can run in case it was started paused.</li> <li><a href='#Runtime.enable'>Runtime.enable</a>: Enables reporting of execution contexts creation by means of executionContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing execution context.</li> <li><a href='#Runtime.disable'>Runtime.disable</a>: Disables reporting of execution contexts creation.</li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#Runtime.executionContextCreated'>Runtime.executionContextCreated</a>: Issued when new execution context is created.</li> </ul> <h3><a href="#Timeline">Timeline</a></h3> <span class='label'>Type</span> <ul> <li><a href='#Timeline.DOMCounters'>Timeline.DOMCounters</a>: Current values of DOM counters.</li> <li><a href='#Timeline.TimelineEvent'>Timeline.TimelineEvent</a>: Timeline record contains information about the recorded activity.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#Timeline.enable'>Timeline.enable</a>: Enables timeline. After this call, timeline can be started from within the page (for example upon console.timeline).</li> <li><a href='#Timeline.disable'>Timeline.disable</a>: Disables timeline.</li> <li><a href='#Timeline.start'>Timeline.start</a>: Starts capturing instrumentation events.</li> <li><a href='#Timeline.stop'>Timeline.stop</a>: Stops capturing instrumentation events.</li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#Timeline.eventRecorded'>Timeline.eventRecorded</a>: Fired for every instrumentation event while timeline is started.</li> <li><a href='#Timeline.started'>Timeline.started</a>: Fired when timeline is started.</li> <li><a href='#Timeline.stopped'>Timeline.stopped</a>: Fired when timeline is stopped.</li> </ul> <h3><a href="#Tracing">Tracing</a></h3> <span class='label label-success'>Command</span> <ul> <li><a href='#Tracing.start'>Tracing.start</a>: Strart trace events collection.</li> <li><a href='#Tracing.end'>Tracing.end</a>: Stop trace events collection.</li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#Tracing.dataCollected'>Tracing.dataCollected</a></li> <li><a href='#Tracing.tracingComplete'>Tracing.tracingComplete</a></li> </ul> <h3><a href="#Worker">Worker</a></h3> <span class='label label-success'>Command</span> <ul> <li><a href='#Worker.enable'>Worker.enable</a></li> <li><a href='#Worker.disable'>Worker.disable</a></li> <li><a href='#Worker.sendMessageToWorker'>Worker.sendMessageToWorker</a></li> <li><a href='#Worker.canInspectWorkers'>Worker.canInspectWorkers</a>: Tells whether browser supports workers inspection.</li> <li><a href='#Worker.connectToWorker'>Worker.connectToWorker</a></li> <li><a href='#Worker.disconnectFromWorker'>Worker.disconnectFromWorker</a></li> <li><a href='#Worker.setAutoconnectToWorkers'>Worker.setAutoconnectToWorkers</a></li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#Worker.workerCreated'>Worker.workerCreated</a></li> <li><a href='#Worker.workerTerminated'>Worker.workerTerminated</a></li> <li><a href='#Worker.dispatchMessageFromWorker'>Worker.dispatchMessageFromWorker</a></li> <li><a href='#Worker.disconnectedFromWorker'>Worker.disconnectedFromWorker</a></li> </ul> </section> <section id='ApplicationCache' class='domain'> <h1>ApplicationCache</h1> <p></p> <span class='label'>Type</span> <ul> <li><a href='#ApplicationCache.ApplicationCacheResource'>ApplicationCache.ApplicationCacheResource</a>: Detailed application cache resource information.</li> <li><a href='#ApplicationCache.ApplicationCache'>ApplicationCache.ApplicationCache</a>: Detailed application cache information.</li> <li><a href='#ApplicationCache.FrameWithManifest'>ApplicationCache.FrameWithManifest</a>: Frame identifier - manifest URL pair.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#ApplicationCache.getFramesWithManifests'>ApplicationCache.getFramesWithManifests</a>: Returns array of frame identifiers with manifest urls for each frame containing a document associated with some application cache.</li> <li><a href='#ApplicationCache.enable'>ApplicationCache.enable</a>: Enables application cache domain notifications.</li> <li><a href='#ApplicationCache.getManifestForFrame'>ApplicationCache.getManifestForFrame</a>: Returns manifest URL for document in the given frame.</li> <li><a href='#ApplicationCache.getApplicationCacheForFrame'>ApplicationCache.getApplicationCacheForFrame</a>: Returns relevant application cache data for the document in given frame.</li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#ApplicationCache.applicationCacheStatusUpdated'>ApplicationCache.applicationCacheStatusUpdated</a></li> <li><a href='#ApplicationCache.networkStateUpdated'>ApplicationCache.networkStateUpdated</a></li> </ul> <div id='ApplicationCache_ApplicationCacheResource' class='type'> <h3>ApplicationCache.ApplicationCacheResource <span class='label'>Type</span></h3> <p>Detailed application cache resource information.</p> <dl> <dt>url</dt> <dd>String <span class='text'>Resource url.</span></dd> <dt>size</dt> <dd>Integer <span class='text'>Resource size.</span></dd> <dt>type</dt> <dd>String <span class='text'>Resource type.</span></dd> </dl> </div> <div id='ApplicationCache_ApplicationCache' class='type'> <h3>ApplicationCache.ApplicationCache <span class='label'>Type</span></h3> <p>Detailed application cache information.</p> <dl> <dt>manifestURL</dt> <dd>String <span class='text'>Manifest URL.</span></dd> <dt>size</dt> <dd>Number <span class='text'>Application cache size.</span></dd> <dt>creationTime</dt> <dd>Number <span class='text'>Application cache creation time.</span></dd> <dt>updateTime</dt> <dd>Number <span class='text'>Application cache update time.</span></dd> <dt>resources</dt> <dd>[<a href='#ApplicationCache.ApplicationCacheResource'>ApplicationCache.ApplicationCacheResource</a>] <span class='text'>Application cache resources.</span></dd> </dl> </div> <div id='ApplicationCache_FrameWithManifest' class='type'> <h3>ApplicationCache.FrameWithManifest <span class='label'>Type</span></h3> <p>Frame identifier - manifest URL pair.</p> <dl> <dt>frameId</dt> <dd><a href='#Page.FrameId'>Page.FrameId</a> <span class='text'>Frame identifier.</span></dd> <dt>manifestURL</dt> <dd>String <span class='text'>Manifest URL.</span></dd> <dt>status</dt> <dd>Integer <span class='text'>Application cache status.</span></dd> </dl> </div> <div id='ApplicationCache_getFramesWithManifests' class='command'> <h3>ApplicationCache.getFramesWithManifests <span class='label label-success'>Command</span></h3> <p>Returns array of frame identifiers with manifest urls for each frame containing a document associated with some application cache.</p> <h4>Callback Parameters:</h4> <dl> <dt>frameIds</dt> <dd>[<a href='#ApplicationCache.FrameWithManifest'>ApplicationCache.FrameWithManifest</a>] <span class='text'>Array of frame identifiers with manifest urls for each frame containing a document associated with some application cache.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: ApplicationCache.getFramesWithManifests ApplicationCache.getFramesWithManifests(function callback(res) { // res = {frameIds} }); </pre> </div> <div id='ApplicationCache_enable' class='command'> <h3>ApplicationCache.enable <span class='label label-success'>Command</span></h3> <p>Enables application cache domain notifications.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: ApplicationCache.enable ApplicationCache.enable(); </pre> </div> <div id='ApplicationCache_getManifestForFrame' class='command'> <h3>ApplicationCache.getManifestForFrame <span class='label label-success'>Command</span></h3> <p>Returns manifest URL for document in the given frame.</p> <dl> <dt>frameId</dt> <dd><a href='#Page.FrameId'>Page.FrameId</a> <span class='text'>Identifier of the frame containing document whose manifest is retrieved.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>manifestURL</dt> <dd>String <span class='text'>Manifest URL for document in the given frame.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: ApplicationCache.getManifestForFrame ApplicationCache.getManifestForFrame(frameId, function callback(res) { // res = {manifestURL} }); </pre> </div> <div id='ApplicationCache_getApplicationCacheForFrame' class='command'> <h3>ApplicationCache.getApplicationCacheForFrame <span class='label label-success'>Command</span></h3> <p>Returns relevant application cache data for the document in given frame.</p> <dl> <dt>frameId</dt> <dd><a href='#Page.FrameId'>Page.FrameId</a> <span class='text'>Identifier of the frame containing document whose application cache is retrieved.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>applicationCache</dt> <dd><a href='#ApplicationCache.ApplicationCache'>ApplicationCache.ApplicationCache</a> <span class='text'>Relevant application cache data for the document in given frame.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: ApplicationCache.getApplicationCacheForFrame ApplicationCache.getApplicationCacheForFrame(frameId, function callback(res) { // res = {applicationCache} }); </pre> </div> <div id='ApplicationCache_applicationCacheStatusUpdated' class='command'> <h3>ApplicationCache.applicationCacheStatusUpdated <span class='label label-info'>Event</span></h3> <dl> <dt>frameId</dt> <dd><a href='#Page.FrameId'>Page.FrameId</a> <span class='text'>Identifier of the frame containing document whose application cache updated status.</span></dd> <dt>manifestURL</dt> <dd>String <span class='text'>Manifest URL.</span></dd> <dt>status</dt> <dd>Integer <span class='text'>Updated application cache status.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: ApplicationCache.applicationCacheStatusUpdated function onApplicationCacheStatusUpdated(res) { // res = {frameId, manifestURL, status} } </pre> </div> <div id='ApplicationCache_networkStateUpdated' class='command'> <h3>ApplicationCache.networkStateUpdated <span class='label label-info'>Event</span></h3> <dl> <dt>isNowOnline</dt> <dd>Boolean</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: ApplicationCache.networkStateUpdated function onNetworkStateUpdated(res) { // res = {isNowOnline} } </pre> </div> </section> <section id='CSS' class='domain'> <h1>CSS</h1> <p>This domain exposes CSS read/write operations. All CSS objects (stylesheets, rules, and styles) have an associated <code>id</code> used in subsequent operations on the related object. Each object type has a specific <code>id</code> structure, and those are not interchangeable between objects of different kinds. CSS objects can be loaded using the <code>get*ForNode()</code> calls (which accept a DOM node id). A client can also discover all the existing stylesheets with the <code>getAllStyleSheets()</code> method (or keeping track of the <code>styleSheetAdded</code>/<code>styleSheetRemoved</code> events) and subsequently load the required stylesheet contents using the <code>getStyleSheet[Text]()</code> methods.</p> <span class='label'>Type</span> <ul> <li><a href='#CSS.StyleSheetId'>CSS.StyleSheetId</a></li> <li><a href='#CSS.CSSStyleId'>CSS.CSSStyleId</a>: This object identifies a CSS style in a unique way.</li> <li><a href='#CSS.StyleSheetOrigin'>CSS.StyleSheetOrigin</a>: Stylesheet type: "user" for user stylesheets, "user-agent" for user-agent stylesheets, "inspector" for stylesheets created by the inspector (i.e. those holding the "via inspector" rules), "regular" for regular stylesheets.</li> <li><a href='#CSS.CSSRuleId'>CSS.CSSRuleId</a>: This object identifies a CSS rule in a unique way.</li> <li><a href='#CSS.PseudoIdMatches'>CSS.PseudoIdMatches</a>: CSS rule collection for a single pseudo style.</li> <li><a href='#CSS.InheritedStyleEntry'>CSS.InheritedStyleEntry</a>: CSS rule collection for a single pseudo style.</li> <li><a href='#CSS.RuleMatch'>CSS.RuleMatch</a>: Match data for a CSS rule.</li> <li><a href='#CSS.SelectorList'>CSS.SelectorList</a>: Selector list data.</li> <li><a href='#CSS.CSSStyleAttribute'>CSS.CSSStyleAttribute</a>: CSS style information for a DOM style attribute.</li> <li><a href='#CSS.CSSStyleSheetHeader'>CSS.CSSStyleSheetHeader</a>: CSS stylesheet metainformation.</li> <li><a href='#CSS.CSSStyleSheetBody'>CSS.CSSStyleSheetBody</a>: CSS stylesheet contents.</li> <li><a href='#CSS.CSSRule'>CSS.CSSRule</a>: CSS rule representation.</li> <li><a href='#CSS.SourceRange'>CSS.SourceRange</a>: Text range within a resource. All numbers are zero-based.</li> <li><a href='#CSS.ShorthandEntry'>CSS.ShorthandEntry</a></li> <li><a href='#CSS.CSSPropertyInfo'>CSS.CSSPropertyInfo</a></li> <li><a href='#CSS.CSSComputedStyleProperty'>CSS.CSSComputedStyleProperty</a></li> <li><a href='#CSS.CSSStyle'>CSS.CSSStyle</a>: CSS style representation.</li> <li><a href='#CSS.CSSProperty'>CSS.CSSProperty</a>: CSS property declaration data.</li> <li><a href='#CSS.CSSMedia'>CSS.CSSMedia</a>: CSS media query descriptor.</li> <li><a href='#CSS.SelectorProfileEntry'>CSS.SelectorProfileEntry</a>: CSS selector profile entry.</li> <li><a href='#CSS.SelectorProfile'>CSS.SelectorProfile</a></li> <li><a href='#CSS.Region'>CSS.Region</a>: This object represents a region that flows from a Named Flow.</li> <li><a href='#CSS.NamedFlow'>CSS.NamedFlow</a>: This object represents a Named Flow.</li> <li><a href='#CSS.PlatformFontUsage'>CSS.PlatformFontUsage</a>: Information about amount of glyphs that were rendered with given font.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#CSS.enable'>CSS.enable</a>: Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been enabled until the result of this command is received.</li> <li><a href='#CSS.disable'>CSS.disable</a>: Disables the CSS agent for the given page.</li> <li><a href='#CSS.getMatchedStylesForNode'>CSS.getMatchedStylesForNode</a>: Returns requested styles for a DOM node identified by nodeId.</li> <li><a href='#CSS.getInlineStylesForNode'>CSS.getInlineStylesForNode</a>: Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM attributes) for a DOM node identified by nodeId.</li> <li><a href='#CSS.getComputedStyleForNode'>CSS.getComputedStyleForNode</a>: Returns the computed style for a DOM node identified by nodeId.</li> <li><a href='#CSS.getPlatformFontsForNode'>CSS.getPlatformFontsForNode</a>: Requests information about platform fonts which we used to render child TextNodes in the given node.</li> <li><a href='#CSS.getAllStyleSheets'>CSS.getAllStyleSheets</a>: Returns metainfo entries for all known stylesheets.</li> <li><a href='#CSS.getStyleSheet'>CSS.getStyleSheet</a>: Returns stylesheet data for the specified styleSheetId.</li> <li><a href='#CSS.getStyleSheetText'>CSS.getStyleSheetText</a>: Returns the current textual content and the URL for a stylesheet.</li> <li><a href='#CSS.setStyleSheetText'>CSS.setStyleSheetText</a>: Sets the new stylesheet text, thereby invalidating all existing CSSStyleId's and CSSRuleId's contained by this stylesheet.</li> <li><a href='#CSS.setStyleText'>CSS.setStyleText</a>: Updates the CSSStyleDeclaration text.</li> <li><a href='#CSS.setPropertyText'>CSS.setPropertyText</a>: Sets the new text for a property in the respective style, at offset propertyIndex. If overwrite is true, a property at the given offset is overwritten, otherwise inserted. text entirely replaces the property name: value.</li> <li><a href='#CSS.toggleProperty'>CSS.toggleProperty</a>: Toggles the property in the respective style, at offset propertyIndex. The disable parameter denotes whether the property should be disabled (i.e. removed from the style declaration). If disable == false, the property gets put back into its original place in the style declaration.</li> <li><a href='#CSS.setRuleSelector'>CSS.setRuleSelector</a>: Modifies the rule selector.</li> <li><a href='#CSS.addRule'>CSS.addRule</a>: Creates a new empty rule with the given selector in a special "inspector" stylesheet in the owner document of the context node.</li> <li><a href='#CSS.getSupportedCSSProperties'>CSS.getSupportedCSSProperties</a>: Returns all supported CSS property names.</li> <li><a href='#CSS.forcePseudoState'>CSS.forcePseudoState</a>: Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser.</li> <li><a href='#CSS.getNamedFlowCollection'>CSS.getNamedFlowCollection</a>: Returns the Named Flows from the document.</li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#CSS.mediaQueryResultChanged'>CSS.mediaQueryResultChanged</a>: Fires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features.</li> <li><a href='#CSS.styleSheetChanged'>CSS.styleSheetChanged</a>: Fired whenever a stylesheet is changed as a result of the client operation.</li> <li><a href='#CSS.styleSheetAdded'>CSS.styleSheetAdded</a>: Fired whenever an active document stylesheet is added.</li> <li><a href='#CSS.styleSheetRemoved'>CSS.styleSheetRemoved</a>: Fired whenever an active document stylesheet is removed.</li> <li><a href='#CSS.namedFlowCreated'>CSS.namedFlowCreated</a>: Fires when a Named Flow is created.</li> <li><a href='#CSS.namedFlowRemoved'>CSS.namedFlowRemoved</a>: Fires when a Named Flow is removed: has no associated content nodes and regions.</li> <li><a href='#CSS.regionLayoutUpdated'>CSS.regionLayoutUpdated</a>: Fires when a Named Flow's layout may have changed.</li> <li><a href='#CSS.regionOversetChanged'>CSS.regionOversetChanged</a>: Fires if any of the regionOverset values changed in a Named Flow's region chain.</li> </ul> <div id='CSS_StyleSheetId' class='type'> <h3>CSS.StyleSheetId <span class='label'>Type</span></h3> <dl> <dd>String</dd> </dl> </div> <div id='CSS_CSSStyleId' class='type'> <h3>CSS.CSSStyleId <span class='label'>Type</span></h3> <p>This object identifies a CSS style in a unique way.</p> <dl> <dt>styleSheetId</dt> <dd><a href='#CSS.StyleSheetId'>CSS.StyleSheetId</a> <span class='text'>Enclosing stylesheet identifier.</span></dd> <dt>ordinal</dt> <dd>Integer <span class='text'>The style ordinal within the stylesheet.</span></dd> </dl> </div> <div id='CSS_StyleSheetOrigin' class='type'> <h3>CSS.StyleSheetOrigin <span class='label'>Type</span></h3> <p>Stylesheet type: "user" for user stylesheets, "user-agent" for user-agent stylesheets, "inspector" for stylesheets created by the inspector (i.e. those holding the "via inspector" rules), "regular" for regular stylesheets.</p> <dl> <dd>( user | user-agent | inspector | regular )</dd> </dl> </div> <div id='CSS_CSSRuleId' class='type'> <h3>CSS.CSSRuleId <span class='label'>Type</span></h3> <p>This object identifies a CSS rule in a unique way.</p> <dl> <dt>styleSheetId</dt> <dd><a href='#CSS.StyleSheetId'>CSS.StyleSheetId</a> <span class='text'>Enclosing stylesheet identifier.</span></dd> <dt>ordinal</dt> <dd>Integer <span class='text'>The rule ordinal within the stylesheet.</span></dd> </dl> </div> <div id='CSS_PseudoIdMatches' class='type'> <h3>CSS.PseudoIdMatches <span class='label'>Type</span></h3> <p>CSS rule collection for a single pseudo style.</p> <dl> <dt>pseudoId</dt> <dd>Integer <span class='text'>Pseudo style identifier (see <code>enum PseudoId</code> in <code>RenderStyleConstants.h</code>).</span></dd> <dt>matches</dt> <dd>[<a href='#CSS.RuleMatch'>CSS.RuleMatch</a>] <span class='text'>Matches of CSS rules applicable to the pseudo style.</span></dd> </dl> </div> <div id='CSS_InheritedStyleEntry' class='type'> <h3>CSS.InheritedStyleEntry <span class='label'>Type</span></h3> <p>CSS rule collection for a single pseudo style.</p> <dl> <dt>inlineStyle (optional)</dt> <dd><a href='#CSS.CSSStyle'>CSS.CSSStyle</a> <span class='text'>The ancestor node's inline style, if any, in the style inheritance chain.</span></dd> <dt>matchedCSSRules</dt> <dd>[<a href='#CSS.RuleMatch'>CSS.RuleMatch</a>] <span class='text'>Matches of CSS rules matching the ancestor node in the style inheritance chain.</span></dd> </dl> </div> <div id='CSS_RuleMatch' class='type'> <h3>CSS.RuleMatch <span class='label'>Type</span></h3> <p>Match data for a CSS rule.</p> <dl> <dt>rule</dt> <dd><a href='#CSS.CSSRule'>CSS.CSSRule</a> <span class='text'>CSS rule in the match.</span></dd> <dt>matchingSelectors</dt> <dd>[Integer] <span class='text'>Matching selector indices in the rule's selectorList selectors (0-based).</span></dd> </dl> </div> <div id='CSS_SelectorList' class='type'> <h3>CSS.SelectorList <span class='label'>Type</span></h3> <p>Selector list data.</p> <dl> <dt>selectors</dt> <dd>[String] <span class='text'>Selectors in the list.</span></dd> <dt>text</dt> <dd>String <span class='text'>Rule selector text.</span></dd> <dt>range (optional)</dt> <dd><a href='#CSS.SourceRange'>CSS.SourceRange</a> <span class='text'>Rule selector range in the underlying resource (if available).</span></dd> </dl> </div> <div id='CSS_CSSStyleAttribute' class='type'> <h3>CSS.CSSStyleAttribute <span class='label'>Type</span></h3> <p>CSS style information for a DOM style attribute.</p> <dl> <dt>name</dt> <dd>String <span class='text'>DOM attribute name (e.g. "width").</span></dd> <dt>style</dt> <dd><a href='#CSS.CSSStyle'>CSS.CSSStyle</a> <span class='text'>CSS style generated by the respective DOM attribute.</span></dd> </dl> </div> <div id='CSS_CSSStyleSheetHeader' class='type'> <h3>CSS.CSSStyleSheetHeader <span class='label'>Type</span></h3> <p>CSS stylesheet metainformation.</p> <dl> <dt>styleSheetId</dt> <dd><a href='#CSS.StyleSheetId'>CSS.StyleSheetId</a> <span class='text'>The stylesheet identifier.</span></dd> <dt>frameId</dt> <dd><a href='#Page.FrameId'>Page.FrameId</a> <span class='text'>Owner frame identifier.</span></dd> <dt>sourceURL</dt> <dd>String <span class='text'>Stylesheet resource URL.</span></dd> <dt>sourceMapURL (optional)</dt> <dd>String <span class='text'>URL of source map associated with the stylesheet (if any).</span></dd> <dt>origin</dt> <dd><a href='#CSS.StyleSheetOrigin'>CSS.StyleSheetOrigin</a> <span class='text'>Stylesheet origin.</span></dd> <dt>title</dt> <dd>String <span class='text'>Stylesheet title.</span></dd> <dt>disabled</dt> <dd>Boolean <span class='text'>Denotes whether the stylesheet is disabled.</span></dd> <dt>hasSourceURL (optional)</dt> <dd>Boolean <span class='text'>Whether the sourceURL field value comes from the sourceURL comment.</span></dd> <dt>isInline</dt> <dd>Boolean <span class='text'>Whether this stylesheet is created for STYLE tag by parser. This flag is not set for document.written STYLE tags.</span></dd> <dt>startLine</dt> <dd>Number <span class='text'>Line offset of the stylesheet within the resource (zero based).</span></dd> <dt>startColumn</dt> <dd>Number <span class='text'>Column offset of the stylesheet within the resource (zero based).</span></dd> </dl> </div> <div id='CSS_CSSStyleSheetBody' class='type'> <h3>CSS.CSSStyleSheetBody <span class='label'>Type</span></h3> <p>CSS stylesheet contents.</p> <dl> <dt>styleSheetId</dt> <dd><a href='#CSS.StyleSheetId'>CSS.StyleSheetId</a> <span class='text'>The stylesheet identifier.</span></dd> <dt>rules</dt> <dd>[<a href='#CSS.CSSRule'>CSS.CSSRule</a>] <span class='text'>Stylesheet resource URL.</span></dd> <dt>text (optional)</dt> <dd>String <span class='text'>Stylesheet resource contents (if available).</span></dd> </dl> </div> <div id='CSS_CSSRule' class='type'> <h3>CSS.CSSRule <span class='label'>Type</span></h3> <p>CSS rule representation.</p> <dl> <dt>ruleId (optional)</dt> <dd><a href='#CSS.CSSRuleId'>CSS.CSSRuleId</a> <span class='text'>The CSS rule identifier (absent for user agent stylesheet and user-specified stylesheet rules).</span></dd> <dt>selectorList</dt> <dd><a href='#CSS.SelectorList'>CSS.SelectorList</a> <span class='text'>Rule selector data.</span></dd> <dt>sourceURL (optional)</dt> <dd>String <span class='text'>Parent stylesheet resource URL (for regular rules).</span></dd> <dt>origin</dt> <dd><a href='#CSS.StyleSheetOrigin'>CSS.StyleSheetOrigin</a> <span class='text'>Parent stylesheet's origin.</span></dd> <dt>style</dt> <dd><a href='#CSS.CSSStyle'>CSS.CSSStyle</a> <span class='text'>Associated style declaration.</span></dd> <dt>media (optional)</dt> <dd>[<a href='#CSS.CSSMedia'>CSS.CSSMedia</a>] <span class='text'>Media list array (for rules involving media queries). The array enumerates media queries starting with the innermost one, going outwards.</span></dd> </dl> </div> <div id='CSS_SourceRange' class='type'> <h3>CSS.SourceRange <span class='label'>Type</span></h3> <p>Text range within a resource. All numbers are zero-based.</p> <dl> <dt>startLine</dt> <dd>Integer <span class='text'>Start line of range.</span></dd> <dt>startColumn</dt> <dd>Integer <span class='text'>Start column of range (inclusive).</span></dd> <dt>endLine</dt> <dd>Integer <span class='text'>End line of range</span></dd> <dt>endColumn</dt> <dd>Integer <span class='text'>End column of range (exclusive).</span></dd> </dl> </div> <div id='CSS_ShorthandEntry' class='type'> <h3>CSS.ShorthandEntry <span class='label'>Type</span></h3> <dl> <dt>name</dt> <dd>String <span class='text'>Shorthand name.</span></dd> <dt>value</dt> <dd>String <span class='text'>Shorthand value.</span></dd> </dl> </div> <div id='CSS_CSSPropertyInfo' class='type'> <h3>CSS.CSSPropertyInfo <span class='label'>Type</span></h3> <dl> <dt>name</dt> <dd>String <span class='text'>Property name.</span></dd> <dt>longhands (optional)</dt> <dd>[String] <span class='text'>Longhand property names.</span></dd> </dl> </div> <div id='CSS_CSSComputedStyleProperty' class='type'> <h3>CSS.CSSComputedStyleProperty <span class='label'>Type</span></h3> <dl> <dt>name</dt> <dd>String <span class='text'>Computed style property name.</span></dd> <dt>value</dt> <dd>String <span class='text'>Computed style property value.</span></dd> </dl> </div> <div id='CSS_CSSStyle' class='type'> <h3>CSS.CSSStyle <span class='label'>Type</span></h3> <p>CSS style representation.</p> <dl> <dt>styleId (optional)</dt> <dd><a href='#CSS.CSSStyleId'>CSS.CSSStyleId</a> <span class='text'>The CSS style identifier (absent for attribute styles).</span></dd> <dt>cssProperties</dt> <dd>[<a href='#CSS.CSSProperty'>CSS.CSSProperty</a>] <span class='text'>CSS properties in the style.</span></dd> <dt>shorthandEntries</dt> <dd>[<a href='#CSS.ShorthandEntry'>CSS.ShorthandEntry</a>] <span class='text'>Computed values for all shorthands found in the style.</span></dd> <dt>cssText (optional)</dt> <dd>String <span class='text'>Style declaration text (if available).</span></dd> <dt>range (optional)</dt> <dd><a href='#CSS.SourceRange'>CSS.SourceRange</a> <span class='text'>Style declaration range in the enclosing stylesheet (if available).</span></dd> <dt>width (optional)</dt> <dd>String <span class='text'>The effective "width" property value from this style.</span></dd> <dt>height (optional)</dt> <dd>String <span class='text'>The effective "height" property value from this style.</span></dd> </dl> </div> <div id='CSS_CSSProperty' class='type'> <h3>CSS.CSSProperty <span class='label'>Type</span></h3> <p>CSS property declaration data.</p> <dl> <dt>name</dt> <dd>String <span class='text'>The property name.</span></dd> <dt>value</dt> <dd>String <span class='text'>The property value.</span></dd> <dt>priority (optional)</dt> <dd>String <span class='text'>The property priority (implies "" if absent).</span></dd> <dt>implicit (optional)</dt> <dd>Boolean <span class='text'>Whether the property is implicit (implies <code>false</code> if absent).</span></dd> <dt>text (optional)</dt> <dd>String <span class='text'>The full property text as specified in the style.</span></dd> <dt>parsedOk (optional)</dt> <dd>Boolean <span class='text'>Whether the property is understood by the browser (implies <code>true</code> if absent).</span></dd> <dt>status (optional)</dt> <dd>( active | inactive | disabled | style ) <span class='text'>The property status: "active" if the property is effective in the style, "inactive" if the property is overridden by a same-named property in this style later on, "disabled" if the property is disabled by the user, "style" (implied if absent) if the property is reported by the browser rather than by the CSS source parser.</span></dd> <dt>range (optional)</dt> <dd><a href='#CSS.SourceRange'>CSS.SourceRange</a> <span class='text'>The entire property range in the enclosing style declaration (if available).</span></dd> </dl> </div> <div id='CSS_CSSMedia' class='type'> <h3>CSS.CSSMedia <span class='label'>Type</span></h3> <p>CSS media query descriptor.</p> <dl> <dt>text</dt> <dd>String <span class='text'>Media query text.</span></dd> <dt>source</dt> <dd>( mediaRule | importRule | linkedSheet | inlineSheet ) <span class='text'>Source of the media query: "mediaRule" if specified by a @media rule, "importRule" if specified by an @import rule, "linkedSheet" if specified by a "media" attribute in a linked stylesheet's LINK tag, "inlineSheet" if specified by a "media" attribute in an inline stylesheet's STYLE tag.</span></dd> <dt>sourceURL (optional)</dt> <dd>String <span class='text'>URL of the document containing the media query description.</span></dd> <dt>range (optional)</dt> <dd><a href='#CSS.SourceRange'>CSS.SourceRange</a> <span class='text'>The associated rule (@media or @import) header range in the enclosing stylesheet (if available).</span></dd> <dt>parentStyleSheetId (optional)</dt> <dd><a href='#CSS.StyleSheetId'>CSS.StyleSheetId</a> <span class='text'>Identifier of the stylesheet containing this object (if exists).</span></dd> </dl> </div> <div id='CSS_SelectorProfileEntry' class='type'> <h3>CSS.SelectorProfileEntry <span class='label'>Type</span></h3> <p>CSS selector profile entry.</p> <dl> <dt>selector</dt> <dd>String <span class='text'>CSS selector of the corresponding rule.</span></dd> <dt>url</dt> <dd>String <span class='text'>URL of the resource containing the corresponding rule.</span></dd> <dt>lineNumber</dt> <dd>Integer <span class='text'>Selector line number in the resource for the corresponding rule.</span></dd> <dt>time</dt> <dd>Number <span class='text'>Total time this rule handling contributed to the browser running time during profiling (in milliseconds).</span></dd> <dt>hitCount</dt> <dd>Integer <span class='text'>Number of times this rule was considered a candidate for matching against DOM elements.</span></dd> <dt>matchCount</dt> <dd>Integer <span class='text'>Number of times this rule actually matched a DOM element.</span></dd> </dl> </div> <div id='CSS_SelectorProfile' class='type'> <h3>CSS.SelectorProfile <span class='label'>Type</span></h3> <dl> <dt>totalTime</dt> <dd>Number <span class='text'>Total processing time for all selectors in the profile (in milliseconds).</span></dd> <dt>data</dt> <dd>[<a href='#CSS.SelectorProfileEntry'>CSS.SelectorProfileEntry</a>] <span class='text'>CSS selector profile entries.</span></dd> </dl> </div> <div id='CSS_Region' class='type'> <h3>CSS.Region <span class='label'>Type</span></h3> <p>This object represents a region that flows from a Named Flow.</p> <dl> <dt>regionOverset</dt> <dd>( overset | fit | empty ) <span class='text'>The "overset" attribute of a Named Flow.</span></dd> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>The corresponding DOM node id.</span></dd> </dl> </div> <div id='CSS_NamedFlow' class='type'> <h3>CSS.NamedFlow <span class='label'>Type</span></h3> <p>This object represents a Named Flow.</p> <dl> <dt>documentNodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>The document node id.</span></dd> <dt>name</dt> <dd>String <span class='text'>Named Flow identifier.</span></dd> <dt>overset</dt> <dd>Boolean <span class='text'>The "overset" attribute of a Named Flow.</span></dd> <dt>content</dt> <dd>[<a href='#DOM.NodeId'>DOM.NodeId</a>] <span class='text'>An array of nodes that flow into the Named Flow.</span></dd> <dt>regions</dt> <dd>[<a href='#CSS.Region'>CSS.Region</a>] <span class='text'>An array of regions associated with the Named Flow.</span></dd> </dl> </div> <div id='CSS_PlatformFontUsage' class='type'> <h3>CSS.PlatformFontUsage <span class='label'>Type</span></h3> <p>Information about amount of glyphs that were rendered with given font.</p> <dl> <dt>familyName</dt> <dd>String <span class='text'>Font's family name reported by platform.</span></dd> <dt>glyphCount</dt> <dd>Number <span class='text'>Amount of glyphs that were rendered with this font.</span></dd> </dl> </div> <div id='CSS_enable' class='command'> <h3>CSS.enable <span class='label label-success'>Command</span></h3> <p>Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been enabled until the result of this command is received.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: CSS.enable CSS.enable(); </pre> </div> <div id='CSS_disable' class='command'> <h3>CSS.disable <span class='label label-success'>Command</span></h3> <p>Disables the CSS agent for the given page.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: CSS.disable CSS.disable(); </pre> </div> <div id='CSS_getMatchedStylesForNode' class='command'> <h3>CSS.getMatchedStylesForNode <span class='label label-success'>Command</span></h3> <p>Returns requested styles for a DOM node identified by <code>nodeId</code>.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a></dd> <dt>includePseudo (optional)</dt> <dd>Boolean <span class='text'>Whether to include pseudo styles (default: true).</span></dd> <dt>includeInherited (optional)</dt> <dd>Boolean <span class='text'>Whether to include inherited styles (default: true).</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>matchedCSSRules (optional)</dt> <dd>[<a href='#CSS.RuleMatch'>CSS.RuleMatch</a>] <span class='text'>CSS rules matching this node, from all applicable stylesheets.</span></dd> <dt>pseudoElements (optional)</dt> <dd>[<a href='#CSS.PseudoIdMatches'>CSS.PseudoIdMatches</a>] <span class='text'>Pseudo style matches for this node.</span></dd> <dt>inherited (optional)</dt> <dd>[<a href='#CSS.InheritedStyleEntry'>CSS.InheritedStyleEntry</a>] <span class='text'>A chain of inherited styles (from the immediate node parent up to the DOM tree root).</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: CSS.getMatchedStylesForNode CSS.getMatchedStylesForNode(nodeId, includePseudo, includeInherited, function callback(res) { // res = {matchedCSSRules, pseudoElements, inherited} }); </pre> </div> <div id='CSS_getInlineStylesForNode' class='command'> <h3>CSS.getInlineStylesForNode <span class='label label-success'>Command</span></h3> <p>Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM attributes) for a DOM node identified by <code>nodeId</code>.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>inlineStyle (optional)</dt> <dd><a href='#CSS.CSSStyle'>CSS.CSSStyle</a> <span class='text'>Inline style for the specified DOM node.</span></dd> <dt>attributesStyle (optional)</dt> <dd><a href='#CSS.CSSStyle'>CSS.CSSStyle</a> <span class='text'>Attribute-defined element style (e.g. resulting from "width=20 height=100%").</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: CSS.getInlineStylesForNode CSS.getInlineStylesForNode(nodeId, function callback(res) { // res = {inlineStyle, attributesStyle} }); </pre> </div> <div id='CSS_getComputedStyleForNode' class='command'> <h3>CSS.getComputedStyleForNode <span class='label label-success'>Command</span></h3> <p>Returns the computed style for a DOM node identified by <code>nodeId</code>.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>computedStyle</dt> <dd>[<a href='#CSS.CSSComputedStyleProperty'>CSS.CSSComputedStyleProperty</a>] <span class='text'>Computed style for the specified DOM node.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: CSS.getComputedStyleForNode CSS.getComputedStyleForNode(nodeId, function callback(res) { // res = {computedStyle} }); </pre> </div> <div id='CSS_getPlatformFontsForNode' class='command'> <h3>CSS.getPlatformFontsForNode <span class='label label-success'>Command</span></h3> <p>Requests information about platform fonts which we used to render child TextNodes in the given node.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>cssFamilyName</dt> <dd>String <span class='text'>Font family name which is determined by computed style.</span></dd> <dt>fonts</dt> <dd>[<a href='#CSS.PlatformFontUsage'>CSS.PlatformFontUsage</a>] <span class='text'>Usage statistics for every employed platform font.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: CSS.getPlatformFontsForNode CSS.getPlatformFontsForNode(nodeId, function callback(res) { // res = {cssFamilyName, fonts} }); </pre> </div> <div id='CSS_getAllStyleSheets' class='command'> <h3>CSS.getAllStyleSheets <span class='label label-success'>Command</span></h3> <p>Returns metainfo entries for all known stylesheets.</p> <h4>Callback Parameters:</h4> <dl> <dt>headers</dt> <dd>[<a href='#CSS.CSSStyleSheetHeader'>CSS.CSSStyleSheetHeader</a>] <span class='text'>Descriptor entries for all available stylesheets.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: CSS.getAllStyleSheets CSS.getAllStyleSheets(function callback(res) { // res = {headers} }); </pre> </div> <div id='CSS_getStyleSheet' class='command'> <h3>CSS.getStyleSheet <span class='label label-success'>Command</span></h3> <p>Returns stylesheet data for the specified <code>styleSheetId</code>.</p> <dl> <dt>styleSheetId</dt> <dd><a href='#CSS.StyleSheetId'>CSS.StyleSheetId</a></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>styleSheet</dt> <dd><a href='#CSS.CSSStyleSheetBody'>CSS.CSSStyleSheetBody</a> <span class='text'>Stylesheet contents for the specified <code>styleSheetId</code>.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: CSS.getStyleSheet CSS.getStyleSheet(styleSheetId, function callback(res) { // res = {styleSheet} }); </pre> </div> <div id='CSS_getStyleSheetText' class='command'> <h3>CSS.getStyleSheetText <span class='label label-success'>Command</span></h3> <p>Returns the current textual content and the URL for a stylesheet.</p> <dl> <dt>styleSheetId</dt> <dd><a href='#CSS.StyleSheetId'>CSS.StyleSheetId</a></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>text</dt> <dd>String <span class='text'>The stylesheet text.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: CSS.getStyleSheetText CSS.getStyleSheetText(styleSheetId, function callback(res) { // res = {text} }); </pre> </div> <div id='CSS_setStyleSheetText' class='command'> <h3>CSS.setStyleSheetText <span class='label label-success'>Command</span></h3> <p>Sets the new stylesheet text, thereby invalidating all existing <code>CSSStyleId</code>'s and <code>CSSRuleId</code>'s contained by this stylesheet.</p> <dl> <dt>styleSheetId</dt> <dd><a href='#CSS.StyleSheetId'>CSS.StyleSheetId</a></dd> <dt>text</dt> <dd>String</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: CSS.setStyleSheetText CSS.setStyleSheetText(styleSheetId, text); </pre> </div> <div id='CSS_setStyleText' class='command'> <h3>CSS.setStyleText <span class='label label-success'>Command</span></h3> <p>Updates the CSSStyleDeclaration text.</p> <dl> <dt>styleId</dt> <dd><a href='#CSS.CSSStyleId'>CSS.CSSStyleId</a></dd> <dt>text</dt> <dd>String</dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>style</dt> <dd><a href='#CSS.CSSStyle'>CSS.CSSStyle</a> <span class='text'>The resulting style after the text modification.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: CSS.setStyleText CSS.setStyleText(styleId, text, function callback(res) { // res = {style} }); </pre> </div> <div id='CSS_setPropertyText' class='command'> <h3>CSS.setPropertyText <span class='label label-success'>Command</span></h3> <p>Sets the new <code>text</code> for a property in the respective style, at offset <code>propertyIndex</code>. If <code>overwrite</code> is <code>true</code>, a property at the given offset is overwritten, otherwise inserted. <code>text</code> entirely replaces the property <code>name: value</code>.</p> <dl> <dt>styleId</dt> <dd><a href='#CSS.CSSStyleId'>CSS.CSSStyleId</a></dd> <dt>propertyIndex</dt> <dd>Integer</dd> <dt>text</dt> <dd>String</dd> <dt>overwrite</dt> <dd>Boolean</dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>style</dt> <dd><a href='#CSS.CSSStyle'>CSS.CSSStyle</a> <span class='text'>The resulting style after the property text modification.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: CSS.setPropertyText CSS.setPropertyText(styleId, propertyIndex, text, overwrite, function callback(res) { // res = {style} }); </pre> </div> <div id='CSS_toggleProperty' class='command'> <h3>CSS.toggleProperty <span class='label label-success'>Command</span></h3> <p>Toggles the property in the respective style, at offset <code>propertyIndex</code>. The <code>disable</code> parameter denotes whether the property should be disabled (i.e. removed from the style declaration). If <code>disable == false</code>, the property gets put back into its original place in the style declaration.</p> <dl> <dt>styleId</dt> <dd><a href='#CSS.CSSStyleId'>CSS.CSSStyleId</a></dd> <dt>propertyIndex</dt> <dd>Integer</dd> <dt>disable</dt> <dd>Boolean</dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>style</dt> <dd><a href='#CSS.CSSStyle'>CSS.CSSStyle</a> <span class='text'>The resulting style after the property toggling.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: CSS.toggleProperty CSS.toggleProperty(styleId, propertyIndex, disable, function callback(res) { // res = {style} }); </pre> </div> <div id='CSS_setRuleSelector' class='command'> <h3>CSS.setRuleSelector <span class='label label-success'>Command</span></h3> <p>Modifies the rule selector.</p> <dl> <dt>ruleId</dt> <dd><a href='#CSS.CSSRuleId'>CSS.CSSRuleId</a></dd> <dt>selector</dt> <dd>String</dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>rule</dt> <dd><a href='#CSS.CSSRule'>CSS.CSSRule</a> <span class='text'>The resulting rule after the selector modification.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: CSS.setRuleSelector CSS.setRuleSelector(ruleId, selector, function callback(res) { // res = {rule} }); </pre> </div> <div id='CSS_addRule' class='command'> <h3>CSS.addRule <span class='label label-success'>Command</span></h3> <p>Creates a new empty rule with the given <code>selector</code> in a special "inspector" stylesheet in the owner document of the context node.</p> <dl> <dt>contextNodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a></dd> <dt>selector</dt> <dd>String</dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>rule</dt> <dd><a href='#CSS.CSSRule'>CSS.CSSRule</a> <span class='text'>The newly created rule.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: CSS.addRule CSS.addRule(contextNodeId, selector, function callback(res) { // res = {rule} }); </pre> </div> <div id='CSS_getSupportedCSSProperties' class='command'> <h3>CSS.getSupportedCSSProperties <span class='label label-success'>Command</span></h3> <p>Returns all supported CSS property names.</p> <h4>Callback Parameters:</h4> <dl> <dt>cssProperties</dt> <dd>[<a href='#CSS.CSSPropertyInfo'>CSS.CSSPropertyInfo</a>] <span class='text'>Supported property metainfo.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: CSS.getSupportedCSSProperties CSS.getSupportedCSSProperties(function callback(res) { // res = {cssProperties} }); </pre> </div> <div id='CSS_forcePseudoState' class='command'> <h3>CSS.forcePseudoState <span class='label label-success'>Command</span></h3> <p>Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>The element id for which to force the pseudo state.</span></dd> <dt>forcedPseudoClasses</dt> <dd>[( active | focus | hover | visited )] <span class='text'>Element pseudo classes to force when computing the element's style.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: CSS.forcePseudoState CSS.forcePseudoState(nodeId, forcedPseudoClasses); </pre> </div> <div id='CSS_getNamedFlowCollection' class='command'> <h3>CSS.getNamedFlowCollection <span class='label label-success'>Command</span></h3> <p>Returns the Named Flows from the document.</p> <dl> <dt>documentNodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>The document node id for which to get the Named Flow Collection.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>namedFlows</dt> <dd>[<a href='#CSS.NamedFlow'>CSS.NamedFlow</a>] <span class='text'>An array containing the Named Flows in the document.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: CSS.getNamedFlowCollection CSS.getNamedFlowCollection(documentNodeId, function callback(res) { // res = {namedFlows} }); </pre> </div> <div id='CSS_mediaQueryResultChanged' class='command'> <h3>CSS.mediaQueryResultChanged <span class='label label-info'>Event</span></h3> <p>Fires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features.</p> <h4>Code Example:</h4> <pre> // WebInspector Event: CSS.mediaQueryResultChanged function onMediaQueryResultChanged(res) { // res = {} } </pre> </div> <div id='CSS_styleSheetChanged' class='command'> <h3>CSS.styleSheetChanged <span class='label label-info'>Event</span></h3> <p>Fired whenever a stylesheet is changed as a result of the client operation.</p> <dl> <dt>styleSheetId</dt> <dd><a href='#CSS.StyleSheetId'>CSS.StyleSheetId</a></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: CSS.styleSheetChanged function onStyleSheetChanged(res) { // res = {styleSheetId} } </pre> </div> <div id='CSS_styleSheetAdded' class='command'> <h3>CSS.styleSheetAdded <span class='label label-info'>Event</span></h3> <p>Fired whenever an active document stylesheet is added.</p> <dl> <dt>header</dt> <dd><a href='#CSS.CSSStyleSheetHeader'>CSS.CSSStyleSheetHeader</a> <span class='text'>Added stylesheet metainfo.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: CSS.styleSheetAdded function onStyleSheetAdded(res) { // res = {header} } </pre> </div> <div id='CSS_styleSheetRemoved' class='command'> <h3>CSS.styleSheetRemoved <span class='label label-info'>Event</span></h3> <p>Fired whenever an active document stylesheet is removed.</p> <dl> <dt>styleSheetId</dt> <dd><a href='#CSS.StyleSheetId'>CSS.StyleSheetId</a> <span class='text'>Identifier of the removed stylesheet.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: CSS.styleSheetRemoved function onStyleSheetRemoved(res) { // res = {styleSheetId} } </pre> </div> <div id='CSS_namedFlowCreated' class='command'> <h3>CSS.namedFlowCreated <span class='label label-info'>Event</span></h3> <p>Fires when a Named Flow is created.</p> <dl> <dt>namedFlow</dt> <dd><a href='#CSS.NamedFlow'>CSS.NamedFlow</a> <span class='text'>The new Named Flow.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: CSS.namedFlowCreated function onNamedFlowCreated(res) { // res = {namedFlow} } </pre> </div> <div id='CSS_namedFlowRemoved' class='command'> <h3>CSS.namedFlowRemoved <span class='label label-info'>Event</span></h3> <p>Fires when a Named Flow is removed: has no associated content nodes and regions.</p> <dl> <dt>documentNodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>The document node id.</span></dd> <dt>flowName</dt> <dd>String <span class='text'>Identifier of the removed Named Flow.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: CSS.namedFlowRemoved function onNamedFlowRemoved(res) { // res = {documentNodeId, flowName} } </pre> </div> <div id='CSS_regionLayoutUpdated' class='command'> <h3>CSS.regionLayoutUpdated <span class='label label-info'>Event</span></h3> <p>Fires when a Named Flow's layout may have changed.</p> <dl> <dt>namedFlow</dt> <dd><a href='#CSS.NamedFlow'>CSS.NamedFlow</a> <span class='text'>The Named Flow whose layout may have changed.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: CSS.regionLayoutUpdated function onRegionLayoutUpdated(res) { // res = {namedFlow} } </pre> </div> <div id='CSS_regionOversetChanged' class='command'> <h3>CSS.regionOversetChanged <span class='label label-info'>Event</span></h3> <p>Fires if any of the regionOverset values changed in a Named Flow's region chain.</p> <dl> <dt>namedFlow</dt> <dd><a href='#CSS.NamedFlow'>CSS.NamedFlow</a> <span class='text'>The Named Flow containing the regions whose regionOverset values changed.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: CSS.regionOversetChanged function onRegionOversetChanged(res) { // res = {namedFlow} } </pre> </div> </section> <section id='Canvas' class='domain'> <h1>Canvas</h1> <p></p> <span class='label'>Type</span> <ul> <li><a href='#Canvas.ResourceId'>Canvas.ResourceId</a>: Unique resource identifier.</li> <li><a href='#Canvas.ResourceStateDescriptor'>Canvas.ResourceStateDescriptor</a>: Resource state descriptor.</li> <li><a href='#Canvas.ResourceState'>Canvas.ResourceState</a>: Resource state.</li> <li><a href='#Canvas.CallArgument'>Canvas.CallArgument</a></li> <li><a href='#Canvas.Call'>Canvas.Call</a></li> <li><a href='#Canvas.TraceLogId'>Canvas.TraceLogId</a>: Unique trace log identifier.</li> <li><a href='#Canvas.TraceLog'>Canvas.TraceLog</a></li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#Canvas.enable'>Canvas.enable</a>: Enables Canvas inspection.</li> <li><a href='#Canvas.disable'>Canvas.disable</a>: Disables Canvas inspection.</li> <li><a href='#Canvas.dropTraceLog'>Canvas.dropTraceLog</a></li> <li><a href='#Canvas.hasUninstrumentedCanvases'>Canvas.hasUninstrumentedCanvases</a>: Checks if there is any uninstrumented canvas in the inspected page.</li> <li><a href='#Canvas.captureFrame'>Canvas.captureFrame</a>: Starts (or continues) a canvas frame capturing which will be stopped automatically after the next frame is prepared.</li> <li><a href='#Canvas.startCapturing'>Canvas.startCapturing</a>: Starts (or continues) consecutive canvas frames capturing. The capturing is stopped by the corresponding stopCapturing command.</li> <li><a href='#Canvas.stopCapturing'>Canvas.stopCapturing</a></li> <li><a href='#Canvas.getTraceLog'>Canvas.getTraceLog</a></li> <li><a href='#Canvas.replayTraceLog'>Canvas.replayTraceLog</a></li> <li><a href='#Canvas.getResourceState'>Canvas.getResourceState</a></li> <li><a href='#Canvas.evaluateTraceLogCallArgument'>Canvas.evaluateTraceLogCallArgument</a>: Evaluates a given trace call argument or its result.</li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#Canvas.contextCreated'>Canvas.contextCreated</a>: Fired when a canvas context has been created in the given frame. The context may not be instrumented (see hasUninstrumentedCanvases command).</li> <li><a href='#Canvas.traceLogsRemoved'>Canvas.traceLogsRemoved</a>: Fired when a set of trace logs were removed from the backend. If no parameters are given, all trace logs were removed.</li> </ul> <div id='Canvas_ResourceId' class='type'> <h3>Canvas.ResourceId <span class='label'>Type</span></h3> <p>Unique resource identifier.</p> <dl> <dd>String</dd> </dl> </div> <div id='Canvas_ResourceStateDescriptor' class='type'> <h3>Canvas.ResourceStateDescriptor <span class='label'>Type</span></h3> <p>Resource state descriptor.</p> <dl> <dt>name</dt> <dd>String <span class='text'>State name.</span></dd> <dt>enumValueForName (optional)</dt> <dd>String <span class='text'>String representation of the enum value, if <code>name</code> stands for an enum.</span></dd> <dt>value (optional)</dt> <dd><a href='#Canvas.CallArgument'>Canvas.CallArgument</a> <span class='text'>The value associated with the particular state.</span></dd> <dt>values (optional)</dt> <dd>[<a href='#Canvas.ResourceStateDescriptor'>Canvas.ResourceStateDescriptor</a>] <span class='text'>Array of values associated with the particular state. Either <code>value</code> or <code>values</code> will be specified.</span></dd> <dt>isArray (optional)</dt> <dd>Boolean <span class='text'>True iff the given <code>values</code> items stand for an array rather than a list of grouped states.</span></dd> </dl> </div> <div id='Canvas_ResourceState' class='type'> <h3>Canvas.ResourceState <span class='label'>Type</span></h3> <p>Resource state.</p> <dl> <dt>id</dt> <dd><a href='#Canvas.ResourceId'>Canvas.ResourceId</a></dd> <dt>traceLogId</dt> <dd><a href='#Canvas.TraceLogId'>Canvas.TraceLogId</a></dd> <dt>descriptors (optional)</dt> <dd>[<a href='#Canvas.ResourceStateDescriptor'>Canvas.ResourceStateDescriptor</a>] <span class='text'>Describes current <code>Resource</code> state.</span></dd> <dt>imageURL (optional)</dt> <dd>String <span class='text'>Screenshot image data URL.</span></dd> </dl> </div> <div id='Canvas_CallArgument' class='type'> <h3>Canvas.CallArgument <span class='label'>Type</span></h3> <dl> <dt>description</dt> <dd>String <span class='text'>String representation of the object.</span></dd> <dt>enumName (optional)</dt> <dd>String <span class='text'>Enum name, if any, that stands for the value (for example, a WebGL enum name).</span></dd> <dt>resourceId (optional)</dt> <dd><a href='#Canvas.ResourceId'>Canvas.ResourceId</a> <span class='text'>Resource identifier. Specified for <code>Resource</code> objects only.</span></dd> <dt>type (optional)</dt> <dd>( object | function | undefined | string | number | boolean ) <span class='text'>Object type. Specified for non <code>Resource</code> objects only.</span></dd> <dt>subtype (optional)</dt> <dd>( array | null | node | regexp | date ) <span class='text'>Object subtype hint. Specified for <code>object</code> type values only.</span></dd> <dt>remoteObject (optional)</dt> <dd><a href='#Runtime.RemoteObject'>Runtime.RemoteObject</a> <span class='text'>The <code>RemoteObject</code>, if requested.</span></dd> </dl> </div> <div id='Canvas_Call' class='type'> <h3>Canvas.Call <span class='label'>Type</span></h3> <dl> <dt>contextId</dt> <dd><a href='#Canvas.ResourceId'>Canvas.ResourceId</a></dd> <dt>functionName (optional)</dt> <dd>String</dd> <dt>arguments (optional)</dt> <dd>[<a href='#Canvas.CallArgument'>Canvas.CallArgument</a>]</dd> <dt>result (optional)</dt> <dd><a href='#Canvas.CallArgument'>Canvas.CallArgument</a></dd> <dt>isDrawingCall (optional)</dt> <dd>Boolean</dd> <dt>isFrameEndCall (optional)</dt> <dd>Boolean</dd> <dt>property (optional)</dt> <dd>String</dd> <dt>value (optional)</dt> <dd><a href='#Canvas.CallArgument'>Canvas.CallArgument</a></dd> <dt>sourceURL (optional)</dt> <dd>String</dd> <dt>lineNumber (optional)</dt> <dd>Integer</dd> <dt>columnNumber (optional)</dt> <dd>Integer</dd> </dl> </div> <div id='Canvas_TraceLogId' class='type'> <h3>Canvas.TraceLogId <span class='label'>Type</span></h3> <p>Unique trace log identifier.</p> <dl> <dd>String</dd> </dl> </div> <div id='Canvas_TraceLog' class='type'> <h3>Canvas.TraceLog <span class='label'>Type</span></h3> <dl> <dt>id</dt> <dd><a href='#Canvas.TraceLogId'>Canvas.TraceLogId</a></dd> <dt>calls</dt> <dd>[<a href='#Canvas.Call'>Canvas.Call</a>]</dd> <dt>contexts</dt> <dd>[<a href='#Canvas.CallArgument'>Canvas.CallArgument</a>]</dd> <dt>startOffset</dt> <dd>Integer</dd> <dt>alive</dt> <dd>Boolean</dd> <dt>totalAvailableCalls</dt> <dd>Number</dd> </dl> </div> <div id='Canvas_enable' class='command'> <h3>Canvas.enable <span class='label label-success'>Command</span></h3> <p>Enables Canvas inspection.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Canvas.enable Canvas.enable(); </pre> </div> <div id='Canvas_disable' class='command'> <h3>Canvas.disable <span class='label label-success'>Command</span></h3> <p>Disables Canvas inspection.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Canvas.disable Canvas.disable(); </pre> </div> <div id='Canvas_dropTraceLog' class='command'> <h3>Canvas.dropTraceLog <span class='label label-success'>Command</span></h3> <dl> <dt>traceLogId</dt> <dd><a href='#Canvas.TraceLogId'>Canvas.TraceLogId</a></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Canvas.dropTraceLog Canvas.dropTraceLog(traceLogId); </pre> </div> <div id='Canvas_hasUninstrumentedCanvases' class='command'> <h3>Canvas.hasUninstrumentedCanvases <span class='label label-success'>Command</span></h3> <p>Checks if there is any uninstrumented canvas in the inspected page.</p> <h4>Callback Parameters:</h4> <dl> <dt>result</dt> <dd>Boolean</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Canvas.hasUninstrumentedCanvases Canvas.hasUninstrumentedCanvases(function callback(res) { // res = {result} }); </pre> </div> <div id='Canvas_captureFrame' class='command'> <h3>Canvas.captureFrame <span class='label label-success'>Command</span></h3> <p>Starts (or continues) a canvas frame capturing which will be stopped automatically after the next frame is prepared.</p> <dl> <dt>frameId (optional)</dt> <dd><a href='#Page.FrameId'>Page.FrameId</a> <span class='text'>Identifier of the frame containing document whose canvases are to be captured. If omitted, main frame is assumed.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>traceLogId</dt> <dd><a href='#Canvas.TraceLogId'>Canvas.TraceLogId</a> <span class='text'>Identifier of the trace log containing captured canvas calls.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Canvas.captureFrame Canvas.captureFrame(frameId, function callback(res) { // res = {traceLogId} }); </pre> </div> <div id='Canvas_startCapturing' class='command'> <h3>Canvas.startCapturing <span class='label label-success'>Command</span></h3> <p>Starts (or continues) consecutive canvas frames capturing. The capturing is stopped by the corresponding stopCapturing command.</p> <dl> <dt>frameId (optional)</dt> <dd><a href='#Page.FrameId'>Page.FrameId</a> <span class='text'>Identifier of the frame containing document whose canvases are to be captured. If omitted, main frame is assumed.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>traceLogId</dt> <dd><a href='#Canvas.TraceLogId'>Canvas.TraceLogId</a> <span class='text'>Identifier of the trace log containing captured canvas calls.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Canvas.startCapturing Canvas.startCapturing(frameId, function callback(res) { // res = {traceLogId} }); </pre> </div> <div id='Canvas_stopCapturing' class='command'> <h3>Canvas.stopCapturing <span class='label label-success'>Command</span></h3> <dl> <dt>traceLogId</dt> <dd><a href='#Canvas.TraceLogId'>Canvas.TraceLogId</a></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Canvas.stopCapturing Canvas.stopCapturing(traceLogId); </pre> </div> <div id='Canvas_getTraceLog' class='command'> <h3>Canvas.getTraceLog <span class='label label-success'>Command</span></h3> <dl> <dt>traceLogId</dt> <dd><a href='#Canvas.TraceLogId'>Canvas.TraceLogId</a></dd> <dt>startOffset (optional)</dt> <dd>Integer</dd> <dt>maxLength (optional)</dt> <dd>Integer</dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>traceLog</dt> <dd><a href='#Canvas.TraceLog'>Canvas.TraceLog</a></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Canvas.getTraceLog Canvas.getTraceLog(traceLogId, startOffset, maxLength, function callback(res) { // res = {traceLog} }); </pre> </div> <div id='Canvas_replayTraceLog' class='command'> <h3>Canvas.replayTraceLog <span class='label label-success'>Command</span></h3> <dl> <dt>traceLogId</dt> <dd><a href='#Canvas.TraceLogId'>Canvas.TraceLogId</a></dd> <dt>stepNo</dt> <dd>Integer <span class='text'>Last call index in the trace log to replay (zero based).</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>resourceState</dt> <dd><a href='#Canvas.ResourceState'>Canvas.ResourceState</a></dd> <dt>replayTime</dt> <dd>Number <span class='text'>Replay time (in milliseconds).</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Canvas.replayTraceLog Canvas.replayTraceLog(traceLogId, stepNo, function callback(res) { // res = {resourceState, replayTime} }); </pre> </div> <div id='Canvas_getResourceState' class='command'> <h3>Canvas.getResourceState <span class='label label-success'>Command</span></h3> <dl> <dt>traceLogId</dt> <dd><a href='#Canvas.TraceLogId'>Canvas.TraceLogId</a></dd> <dt>resourceId</dt> <dd><a href='#Canvas.ResourceId'>Canvas.ResourceId</a></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>resourceState</dt> <dd><a href='#Canvas.ResourceState'>Canvas.ResourceState</a></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Canvas.getResourceState Canvas.getResourceState(traceLogId, resourceId, function callback(res) { // res = {resourceState} }); </pre> </div> <div id='Canvas_evaluateTraceLogCallArgument' class='command'> <h3>Canvas.evaluateTraceLogCallArgument <span class='label label-success'>Command</span></h3> <p>Evaluates a given trace call argument or its result.</p> <dl> <dt>traceLogId</dt> <dd><a href='#Canvas.TraceLogId'>Canvas.TraceLogId</a></dd> <dt>callIndex</dt> <dd>Integer <span class='text'>Index of the call to evaluate on (zero based).</span></dd> <dt>argumentIndex</dt> <dd>Integer <span class='text'>Index of the argument to evaluate (zero based). Provide <code>-1</code> to evaluate call result.</span></dd> <dt>objectGroup (optional)</dt> <dd>String <span class='text'>String object group name to put result into (allows rapid releasing resulting object handles using <code>Runtime.releaseObjectGroup</code>).</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>result (optional)</dt> <dd><a href='#Runtime.RemoteObject'>Runtime.RemoteObject</a> <span class='text'>Object wrapper for the evaluation result.</span></dd> <dt>resourceState (optional)</dt> <dd><a href='#Canvas.ResourceState'>Canvas.ResourceState</a> <span class='text'>State of the <code>Resource</code> object.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Canvas.evaluateTraceLogCallArgument Canvas.evaluateTraceLogCallArgument(traceLogId, callIndex, argumentIndex, objectGroup, function callback(res) { // res = {result, resourceState} }); </pre> </div> <div id='Canvas_contextCreated' class='command'> <h3>Canvas.contextCreated <span class='label label-info'>Event</span></h3> <p>Fired when a canvas context has been created in the given frame. The context may not be instrumented (see hasUninstrumentedCanvases command).</p> <dl> <dt>frameId</dt> <dd><a href='#Page.FrameId'>Page.FrameId</a> <span class='text'>Identifier of the frame containing a canvas with a context.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Canvas.contextCreated function onContextCreated(res) { // res = {frameId} } </pre> </div> <div id='Canvas_traceLogsRemoved' class='command'> <h3>Canvas.traceLogsRemoved <span class='label label-info'>Event</span></h3> <p>Fired when a set of trace logs were removed from the backend. If no parameters are given, all trace logs were removed.</p> <dl> <dt>frameId (optional)</dt> <dd><a href='#Page.FrameId'>Page.FrameId</a> <span class='text'>If given, trace logs from the given frame were removed.</span></dd> <dt>traceLogId (optional)</dt> <dd><a href='#Canvas.TraceLogId'>Canvas.TraceLogId</a> <span class='text'>If given, trace log with the given ID was removed.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Canvas.traceLogsRemoved function onTraceLogsRemoved(res) { // res = {frameId, traceLogId} } </pre> </div> </section> <section id='Console' class='domain'> <h1>Console</h1> <p>Console domain defines methods and events for interaction with the JavaScript console. Console collects messages created by means of the <a href='http://getfirebug.com/wiki/index.php/Console_API'>JavaScript Console API</a>. One needs to enable this domain using <code>enable</code> command in order to start receiving the console messages. Browser collects messages issued while console domain is not enabled as well and reports them using <code>messageAdded</code> notification upon enabling.</p> <span class='label'>Type</span> <ul> <li><a href='#Console.Timestamp'>Console.Timestamp</a>: Number of seconds since epoch.</li> <li><a href='#Console.ConsoleMessage'>Console.ConsoleMessage</a>: Console message.</li> <li><a href='#Console.CallFrame'>Console.CallFrame</a>: Stack entry for console errors and assertions.</li> <li><a href='#Console.StackTrace'>Console.StackTrace</a>: Call frames for assertions or error messages.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#Console.enable'>Console.enable</a>: Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification.</li> <li><a href='#Console.disable'>Console.disable</a>: Disables console domain, prevents further console messages from being reported to the client.</li> <li><a href='#Console.clearMessages'>Console.clearMessages</a>: Clears console messages collected in the browser.</li> <li><a href='#Console.setMonitoringXHREnabled'>Console.setMonitoringXHREnabled</a>: Toggles monitoring of XMLHttpRequest. If true, console will receive messages upon each XHR issued.</li> <li><a href='#Console.addInspectedNode'>Console.addInspectedNode</a>: Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).</li> <li><a href='#Console.addInspectedHeapObject'>Console.addInspectedHeapObject</a></li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#Console.messageAdded'>Console.messageAdded</a>: Issued when new console message is added.</li> <li><a href='#Console.messageRepeatCountUpdated'>Console.messageRepeatCountUpdated</a>: Issued when subsequent message(s) are equal to the previous one(s).</li> <li><a href='#Console.messagesCleared'>Console.messagesCleared</a>: Issued when console is cleared. This happens either upon clearMessages command or after page navigation.</li> </ul> <div id='Console_Timestamp' class='type'> <h3>Console.Timestamp <span class='label'>Type</span></h3> <p>Number of seconds since epoch.</p> <dl> <dd>Number</dd> </dl> </div> <div id='Console_ConsoleMessage' class='type'> <h3>Console.ConsoleMessage <span class='label'>Type</span></h3> <p>Console message.</p> <dl> <dt>source</dt> <dd>( xml | javascript | network | console-api | storage | appcache | rendering | css | security | other | deprecation ) <span class='text'>Message source.</span></dd> <dt>level</dt> <dd>( log | warning | error | debug ) <span class='text'>Message severity.</span></dd> <dt>text</dt> <dd>String <span class='text'>Message text.</span></dd> <dt>type (optional)</dt> <dd>( log | dir | dirxml | table | trace | clear | startGroup | startGroupCollapsed | endGroup | assert | profile | profileEnd ) <span class='text'>Console message type.</span></dd> <dt>url (optional)</dt> <dd>String <span class='text'>URL of the message origin.</span></dd> <dt>line (optional)</dt> <dd>Integer <span class='text'>Line number in the resource that generated this message.</span></dd> <dt>column (optional)</dt> <dd>Integer <span class='text'>Column number in the resource that generated this message.</span></dd> <dt>repeatCount (optional)</dt> <dd>Integer <span class='text'>Repeat count for repeated messages.</span></dd> <dt>parameters (optional)</dt> <dd>[<a href='#Runtime.RemoteObject'>Runtime.RemoteObject</a>] <span class='text'>Message parameters in case of the formatted message.</span></dd> <dt>stackTrace (optional)</dt> <dd><a href='#Console.StackTrace'>Console.StackTrace</a> <span class='text'>JavaScript stack trace for assertions and error messages.</span></dd> <dt>networkRequestId (optional)</dt> <dd><a href='#Network.RequestId'>Network.RequestId</a> <span class='text'>Identifier of the network request associated with this message.</span></dd> <dt>timestamp</dt> <dd><a href='#Console.Timestamp'>Console.Timestamp</a> <span class='text'>Timestamp, when this message was fired.</span></dd> </dl> </div> <div id='Console_CallFrame' class='type'> <h3>Console.CallFrame <span class='label'>Type</span></h3> <p>Stack entry for console errors and assertions.</p> <dl> <dt>functionName</dt> <dd>String <span class='text'>JavaScript function name.</span></dd> <dt>scriptId</dt> <dd>String <span class='text'>JavaScript script id.</span></dd> <dt>url</dt> <dd>String <span class='text'>JavaScript script name or url.</span></dd> <dt>lineNumber</dt> <dd>Integer <span class='text'>JavaScript script line number.</span></dd> <dt>columnNumber</dt> <dd>Integer <span class='text'>JavaScript script column number.</span></dd> </dl> </div> <div id='Console_StackTrace' class='type'> <h3>Console.StackTrace <span class='label'>Type</span></h3> <p>Call frames for assertions or error messages.</p> <dl> <dd>[<a href='#Console.CallFrame'>Console.CallFrame</a>]</dd> </dl> </div> <div id='Console_enable' class='command'> <h3>Console.enable <span class='label label-success'>Command</span></h3> <p>Enables console domain, sends the messages collected so far to the client by means of the <code>messageAdded</code> notification.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Console.enable Console.enable(); </pre> </div> <div id='Console_disable' class='command'> <h3>Console.disable <span class='label label-success'>Command</span></h3> <p>Disables console domain, prevents further console messages from being reported to the client.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Console.disable Console.disable(); </pre> </div> <div id='Console_clearMessages' class='command'> <h3>Console.clearMessages <span class='label label-success'>Command</span></h3> <p>Clears console messages collected in the browser.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Console.clearMessages Console.clearMessages(); </pre> </div> <div id='Console_setMonitoringXHREnabled' class='command'> <h3>Console.setMonitoringXHREnabled <span class='label label-success'>Command</span></h3> <p>Toggles monitoring of XMLHttpRequest. If <code>true</code>, console will receive messages upon each XHR issued.</p> <dl> <dt>enabled</dt> <dd>Boolean <span class='text'>Monitoring enabled state.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Console.setMonitoringXHREnabled Console.setMonitoringXHREnabled(enabled); </pre> </div> <div id='Console_addInspectedNode' class='command'> <h3>Console.addInspectedNode <span class='label label-success'>Command</span></h3> <p>Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>DOM node id to be accessible by means of $x command line API.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Console.addInspectedNode Console.addInspectedNode(nodeId); </pre> </div> <div id='Console_addInspectedHeapObject' class='command'> <h3>Console.addInspectedHeapObject <span class='label label-success'>Command</span></h3> <dl> <dt>heapObjectId</dt> <dd>Integer</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Console.addInspectedHeapObject Console.addInspectedHeapObject(heapObjectId); </pre> </div> <div id='Console_messageAdded' class='command'> <h3>Console.messageAdded <span class='label label-info'>Event</span></h3> <p>Issued when new console message is added.</p> <dl> <dt>message</dt> <dd><a href='#Console.ConsoleMessage'>Console.ConsoleMessage</a> <span class='text'>Console message that has been added.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Console.messageAdded function onMessageAdded(res) { // res = {message} } </pre> </div> <div id='Console_messageRepeatCountUpdated' class='command'> <h3>Console.messageRepeatCountUpdated <span class='label label-info'>Event</span></h3> <p>Issued when subsequent message(s) are equal to the previous one(s).</p> <dl> <dt>count</dt> <dd>Integer <span class='text'>New repeat count value.</span></dd> <dt>timestamp</dt> <dd><a href='#Console.Timestamp'>Console.Timestamp</a> <span class='text'>Timestamp of most recent message in batch.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Console.messageRepeatCountUpdated function onMessageRepeatCountUpdated(res) { // res = {count, timestamp} } </pre> </div> <div id='Console_messagesCleared' class='command'> <h3>Console.messagesCleared <span class='label label-info'>Event</span></h3> <p>Issued when console is cleared. This happens either upon <code>clearMessages</code> command or after page navigation.</p> <h4>Code Example:</h4> <pre> // WebInspector Event: Console.messagesCleared function onMessagesCleared(res) { // res = {} } </pre> </div> </section> <section id='DOM' class='domain'> <h1>DOM</h1> <p>This domain exposes DOM read/write operations. Each DOM Node is represented with its mirror object that has an <code>id</code>. This <code>id</code> can be used to get additional information on the Node, resolve it into the JavaScript object wrapper, etc. It is important that client receives DOM events only for the nodes that are known to the client. Backend keeps track of the nodes that were sent to the client and never sends the same node twice. It is client's responsibility to collect information about the nodes that were sent to the client.<p>Note that <code>iframe</code> owner elements will return corresponding document elements as their child nodes.</p></p> <span class='label'>Type</span> <ul> <li><a href='#DOM.NodeId'>DOM.NodeId</a>: Unique DOM node identifier.</li> <li><a href='#DOM.BackendNodeId'>DOM.BackendNodeId</a>: Unique DOM node identifier used to reference a node that may not have been pushed to the front-end.</li> <li><a href='#DOM.PseudoType'>DOM.PseudoType</a>: Pseudo element type.</li> <li><a href='#DOM.Node'>DOM.Node</a>: DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type.</li> <li><a href='#DOM.EventListener'>DOM.EventListener</a>: DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type.</li> <li><a href='#DOM.RGBA'>DOM.RGBA</a>: A structure holding an RGBA color.</li> <li><a href='#DOM.Quad'>DOM.Quad</a>: An array of quad vertices, x immediately followed by y for each point, points clock-wise.</li> <li><a href='#DOM.BoxModel'>DOM.BoxModel</a>: Box model.</li> <li><a href='#DOM.Rect'>DOM.Rect</a>: Rectangle.</li> <li><a href='#DOM.HighlightConfig'>DOM.HighlightConfig</a>: Configuration data for the highlighting of page elements.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#DOM.enable'>DOM.enable</a>: Enables DOM agent for the given page.</li> <li><a href='#DOM.disable'>DOM.disable</a>: Disables DOM agent for the given page.</li> <li><a href='#DOM.getDocument'>DOM.getDocument</a>: Returns the root DOM node to the caller.</li> <li><a href='#DOM.requestChildNodes'>DOM.requestChildNodes</a>: Requests that children of the node with given id are returned to the caller in form of setChildNodes events where not only immediate children are retrieved, but all children down to the specified depth.</li> <li><a href='#DOM.querySelector'>DOM.querySelector</a>: Executes querySelector on a given node.</li> <li><a href='#DOM.querySelectorAll'>DOM.querySelectorAll</a>: Executes querySelectorAll on a given node.</li> <li><a href='#DOM.setNodeName'>DOM.setNodeName</a>: Sets node name for a node with given id.</li> <li><a href='#DOM.setNodeValue'>DOM.setNodeValue</a>: Sets node value for a node with given id.</li> <li><a href='#DOM.removeNode'>DOM.removeNode</a>: Removes node with given id.</li> <li><a href='#DOM.setAttributeValue'>DOM.setAttributeValue</a>: Sets attribute for an element with given id.</li> <li><a href='#DOM.setAttributesAsText'>DOM.setAttributesAsText</a>: Sets attributes on element with given id. This method is useful when user edits some existing attribute value and types in several attribute name/value pairs.</li> <li><a href='#DOM.removeAttribute'>DOM.removeAttribute</a>: Removes attribute with given name from an element with given id.</li> <li><a href='#DOM.getEventListenersForNode'>DOM.getEventListenersForNode</a>: Returns event listeners relevant to the node.</li> <li><a href='#DOM.getOuterHTML'>DOM.getOuterHTML</a>: Returns node's HTML markup.</li> <li><a href='#DOM.setOuterHTML'>DOM.setOuterHTML</a>: Sets node HTML markup, returns new node id.</li> <li><a href='#DOM.performSearch'>DOM.performSearch</a>: Searches for a given string in the DOM tree. Use getSearchResults to access search results or cancelSearch to end this search session.</li> <li><a href='#DOM.getSearchResults'>DOM.getSearchResults</a>: Returns search results from given fromIndex to given toIndex from the sarch with the given identifier.</li> <li><a href='#DOM.discardSearchResults'>DOM.discardSearchResults</a>: Discards search results from the session with the given id. getSearchResults should no longer be called for that search.</li> <li><a href='#DOM.requestNode'>DOM.requestNode</a>: Requests that the node is sent to the caller given the JavaScript node object reference. All nodes that form the path from the node to the root are also sent to the client as a series of setChildNodes notifications.</li> <li><a href='#DOM.setInspectModeEnabled'>DOM.setInspectModeEnabled</a>: Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection.</li> <li><a href='#DOM.highlightRect'>DOM.highlightRect</a>: Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.</li> <li><a href='#DOM.highlightQuad'>DOM.highlightQuad</a>: Highlights given quad. Coordinates are absolute with respect to the main frame viewport.</li> <li><a href='#DOM.highlightNode'>DOM.highlightNode</a>: Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.</li> <li><a href='#DOM.hideHighlight'>DOM.hideHighlight</a>: Hides DOM node highlight.</li> <li><a href='#DOM.highlightFrame'>DOM.highlightFrame</a>: Highlights owner element of the frame with given id.</li> <li><a href='#DOM.pushNodeByPathToFrontend'>DOM.pushNodeByPathToFrontend</a>: Requests that the node is sent to the caller given its path. // FIXME, use XPath</li> <li><a href='#DOM.pushNodeByBackendIdToFrontend'>DOM.pushNodeByBackendIdToFrontend</a>: Requests that the node is sent to the caller given its backend node id.</li> <li><a href='#DOM.releaseBackendNodeIds'>DOM.releaseBackendNodeIds</a>: Requests that group of BackendNodeIds is released.</li> <li><a href='#DOM.resolveNode'>DOM.resolveNode</a>: Resolves JavaScript node object for given node id.</li> <li><a href='#DOM.getAttributes'>DOM.getAttributes</a>: Returns attributes for the specified node.</li> <li><a href='#DOM.moveTo'>DOM.moveTo</a>: Moves node into the new container, places it before the given anchor.</li> <li><a href='#DOM.undo'>DOM.undo</a>: Undoes the last performed action.</li> <li><a href='#DOM.redo'>DOM.redo</a>: Re-does the last undone action.</li> <li><a href='#DOM.markUndoableState'>DOM.markUndoableState</a>: Marks last undoable state.</li> <li><a href='#DOM.focus'>DOM.focus</a>: Focuses the given element.</li> <li><a href='#DOM.setFileInputFiles'>DOM.setFileInputFiles</a>: Sets files for the given file input element.</li> <li><a href='#DOM.getBoxModel'>DOM.getBoxModel</a>: Returns boxes for the currently selected nodes.</li> <li><a href='#DOM.getNodeForLocation'>DOM.getNodeForLocation</a>: Returns node id at given location.</li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#DOM.documentUpdated'>DOM.documentUpdated</a>: Fired when Document has been totally updated. Node ids are no longer valid.</li> <li><a href='#DOM.inspectNodeRequested'>DOM.inspectNodeRequested</a>: Fired when the node should be inspected. This happens after call to setInspectModeEnabled.</li> <li><a href='#DOM.setChildNodes'>DOM.setChildNodes</a>: Fired when backend wants to provide client with the missing DOM structure. This happens upon most of the calls requesting node ids.</li> <li><a href='#DOM.attributeModified'>DOM.attributeModified</a>: Fired when Element's attribute is modified.</li> <li><a href='#DOM.attributeRemoved'>DOM.attributeRemoved</a>: Fired when Element's attribute is removed.</li> <li><a href='#DOM.inlineStyleInvalidated'>DOM.inlineStyleInvalidated</a>: Fired when Element's inline style is modified via a CSS property modification.</li> <li><a href='#DOM.characterDataModified'>DOM.characterDataModified</a>: Mirrors DOMCharacterDataModified event.</li> <li><a href='#DOM.childNodeCountUpdated'>DOM.childNodeCountUpdated</a>: Fired when Container's child node count has changed.</li> <li><a href='#DOM.childNodeInserted'>DOM.childNodeInserted</a>: Mirrors DOMNodeInserted event.</li> <li><a href='#DOM.childNodeRemoved'>DOM.childNodeRemoved</a>: Mirrors DOMNodeRemoved event.</li> <li><a href='#DOM.shadowRootPushed'>DOM.shadowRootPushed</a>: Called when shadow root is pushed into the element.</li> <li><a href='#DOM.shadowRootPopped'>DOM.shadowRootPopped</a>: Called when shadow root is popped from the element.</li> <li><a href='#DOM.pseudoElementAdded'>DOM.pseudoElementAdded</a>: Called when a pseudo element is added to an element.</li> <li><a href='#DOM.pseudoElementRemoved'>DOM.pseudoElementRemoved</a>: Called when a pseudo element is removed from an element.</li> </ul> <div id='DOM_NodeId' class='type'> <h3>DOM.NodeId <span class='label'>Type</span></h3> <p>Unique DOM node identifier.</p> <dl> <dd>Integer</dd> </dl> </div> <div id='DOM_BackendNodeId' class='type'> <h3>DOM.BackendNodeId <span class='label'>Type</span></h3> <p>Unique DOM node identifier used to reference a node that may not have been pushed to the front-end.</p> <dl> <dd>Integer</dd> </dl> </div> <div id='DOM_PseudoType' class='type'> <h3>DOM.PseudoType <span class='label'>Type</span></h3> <p>Pseudo element type.</p> <dl> <dd>( before | after )</dd> </dl> </div> <div id='DOM_Node' class='type'> <h3>DOM.Node <span class='label'>Type</span></h3> <p>DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Node identifier that is passed into the rest of the DOM messages as the <code>nodeId</code>. Backend will only push node with given <code>id</code> once. It is aware of all requested nodes and will only fire DOM events for nodes known to the client.</span></dd> <dt>nodeType</dt> <dd>Integer <span class='text'><code>Node</code>'s nodeType.</span></dd> <dt>nodeName</dt> <dd>String <span class='text'><code>Node</code>'s nodeName.</span></dd> <dt>localName</dt> <dd>String <span class='text'><code>Node</code>'s localName.</span></dd> <dt>nodeValue</dt> <dd>String <span class='text'><code>Node</code>'s nodeValue.</span></dd> <dt>childNodeCount (optional)</dt> <dd>Integer <span class='text'>Child count for <code>Container</code> nodes.</span></dd> <dt>children (optional)</dt> <dd>[<a href='#DOM.Node'>DOM.Node</a>] <span class='text'>Child nodes of this node when requested with children.</span></dd> <dt>attributes (optional)</dt> <dd>[String] <span class='text'>Attributes of the <code>Element</code> node in the form of flat array <code>[name1, value1, name2, value2]</code>.</span></dd> <dt>documentURL (optional)</dt> <dd>String <span class='text'>Document URL that <code>Document</code> or <code>FrameOwner</code> node points to.</span></dd> <dt>baseURL (optional)</dt> <dd>String <span class='text'>Base URL that <code>Document</code> or <code>FrameOwner</code> node uses for URL completion.</span></dd> <dt>publicId (optional)</dt> <dd>String <span class='text'><code>DocumentType</code>'s publicId.</span></dd> <dt>systemId (optional)</dt> <dd>String <span class='text'><code>DocumentType</code>'s systemId.</span></dd> <dt>internalSubset (optional)</dt> <dd>String <span class='text'><code>DocumentType</code>'s internalSubset.</span></dd> <dt>xmlVersion (optional)</dt> <dd>String <span class='text'><code>Document</code>'s XML version in case of XML documents.</span></dd> <dt>name (optional)</dt> <dd>String <span class='text'><code>Attr</code>'s name.</span></dd> <dt>value (optional)</dt> <dd>String <span class='text'><code>Attr</code>'s value.</span></dd> <dt>pseudoType (optional)</dt> <dd><a href='#DOM.PseudoType'>DOM.PseudoType</a> <span class='text'>Pseudo element type for this node.</span></dd> <dt>frameId (optional)</dt> <dd><a href='#Page.FrameId'>Page.FrameId</a> <span class='text'>Frame ID for frame owner elements.</span></dd> <dt>contentDocument (optional)</dt> <dd><a href='#DOM.Node'>DOM.Node</a> <span class='text'>Content document for frame owner elements.</span></dd> <dt>shadowRoots (optional)</dt> <dd>[<a href='#DOM.Node'>DOM.Node</a>] <span class='text'>Shadow root list for given element host.</span></dd> <dt>templateContent (optional)</dt> <dd><a href='#DOM.Node'>DOM.Node</a> <span class='text'>Content document fragment for template elements.</span></dd> <dt>pseudoElements (optional)</dt> <dd>[<a href='#DOM.Node'>DOM.Node</a>] <span class='text'>Pseudo elements associated with this node.</span></dd> </dl> </div> <div id='DOM_EventListener' class='type'> <h3>DOM.EventListener <span class='label'>Type</span></h3> <p>DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type.</p> <dl> <dt>type</dt> <dd>String <span class='text'><code>EventListener</code>'s type.</span></dd> <dt>useCapture</dt> <dd>Boolean <span class='text'><code>EventListener</code>'s useCapture.</span></dd> <dt>isAttribute</dt> <dd>Boolean <span class='text'><code>EventListener</code>'s isAttribute.</span></dd> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Target <code>DOMNode</code> id.</span></dd> <dt>handlerBody</dt> <dd>String <span class='text'>Event handler function body.</span></dd> <dt>location (optional)</dt> <dd><a href='#Debugger.Location'>Debugger.Location</a> <span class='text'>Handler code location.</span></dd> <dt>sourceName (optional)</dt> <dd>String <span class='text'>Source script URL.</span></dd> <dt>handler (optional)</dt> <dd><a href='#Runtime.RemoteObject'>Runtime.RemoteObject</a> <span class='text'>Event handler function value.</span></dd> </dl> </div> <div id='DOM_RGBA' class='type'> <h3>DOM.RGBA <span class='label'>Type</span></h3> <p>A structure holding an RGBA color.</p> <dl> <dt>r</dt> <dd>Integer <span class='text'>The red component, in the [0-255] range.</span></dd> <dt>g</dt> <dd>Integer <span class='text'>The green component, in the [0-255] range.</span></dd> <dt>b</dt> <dd>Integer <span class='text'>The blue component, in the [0-255] range.</span></dd> <dt>a (optional)</dt> <dd>Number <span class='text'>The alpha component, in the [0-1] range (default: 1).</span></dd> </dl> </div> <div id='DOM_Quad' class='type'> <h3>DOM.Quad <span class='label'>Type</span></h3> <p>An array of quad vertices, x immediately followed by y for each point, points clock-wise.</p> <dl> <dd>[Number]</dd> </dl> </div> <div id='DOM_BoxModel' class='type'> <h3>DOM.BoxModel <span class='label'>Type</span></h3> <p>Box model.</p> <dl> <dt>content</dt> <dd><a href='#DOM.Quad'>DOM.Quad</a> <span class='text'>Content box</span></dd> <dt>padding</dt> <dd><a href='#DOM.Quad'>DOM.Quad</a> <span class='text'>Padding box</span></dd> <dt>border</dt> <dd><a href='#DOM.Quad'>DOM.Quad</a> <span class='text'>Border box</span></dd> <dt>margin</dt> <dd><a href='#DOM.Quad'>DOM.Quad</a> <span class='text'>Margin box</span></dd> <dt>width</dt> <dd>Integer <span class='text'>Node width</span></dd> <dt>height</dt> <dd>Integer <span class='text'>Node height</span></dd> </dl> </div> <div id='DOM_Rect' class='type'> <h3>DOM.Rect <span class='label'>Type</span></h3> <p>Rectangle.</p> <dl> <dt>x</dt> <dd>Number <span class='text'>X coordinate</span></dd> <dt>y</dt> <dd>Number <span class='text'>Y coordinate</span></dd> <dt>width</dt> <dd>Number <span class='text'>Rectangle width</span></dd> <dt>height</dt> <dd>Number <span class='text'>Rectangle height</span></dd> </dl> </div> <div id='DOM_HighlightConfig' class='type'> <h3>DOM.HighlightConfig <span class='label'>Type</span></h3> <p>Configuration data for the highlighting of page elements.</p> <dl> <dt>showInfo (optional)</dt> <dd>Boolean <span class='text'>Whether the node info tooltip should be shown (default: false).</span></dd> <dt>contentColor (optional)</dt> <dd><a href='#DOM.RGBA'>DOM.RGBA</a> <span class='text'>The content box highlight fill color (default: transparent).</span></dd> <dt>paddingColor (optional)</dt> <dd><a href='#DOM.RGBA'>DOM.RGBA</a> <span class='text'>The padding highlight fill color (default: transparent).</span></dd> <dt>borderColor (optional)</dt> <dd><a href='#DOM.RGBA'>DOM.RGBA</a> <span class='text'>The border highlight fill color (default: transparent).</span></dd> <dt>marginColor (optional)</dt> <dd><a href='#DOM.RGBA'>DOM.RGBA</a> <span class='text'>The margin highlight fill color (default: transparent).</span></dd> <dt>eventTargetColor (optional)</dt> <dd><a href='#DOM.RGBA'>DOM.RGBA</a> <span class='text'>The event target element highlight fill color (default: transparent).</span></dd> </dl> </div> <div id='DOM_enable' class='command'> <h3>DOM.enable <span class='label label-success'>Command</span></h3> <p>Enables DOM agent for the given page.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.enable DOM.enable(); </pre> </div> <div id='DOM_disable' class='command'> <h3>DOM.disable <span class='label label-success'>Command</span></h3> <p>Disables DOM agent for the given page.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.disable DOM.disable(); </pre> </div> <div id='DOM_getDocument' class='command'> <h3>DOM.getDocument <span class='label label-success'>Command</span></h3> <p>Returns the root DOM node to the caller.</p> <h4>Callback Parameters:</h4> <dl> <dt>root</dt> <dd><a href='#DOM.Node'>DOM.Node</a> <span class='text'>Resulting node.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.getDocument DOM.getDocument(function callback(res) { // res = {root} }); </pre> </div> <div id='DOM_requestChildNodes' class='command'> <h3>DOM.requestChildNodes <span class='label label-success'>Command</span></h3> <p>Requests that children of the node with given id are returned to the caller in form of <code>setChildNodes</code> events where not only immediate children are retrieved, but all children down to the specified depth.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Id of the node to get children for.</span></dd> <dt>depth (optional)</dt> <dd>Integer <span class='text'>The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.requestChildNodes DOM.requestChildNodes(nodeId, depth); </pre> </div> <div id='DOM_querySelector' class='command'> <h3>DOM.querySelector <span class='label label-success'>Command</span></h3> <p>Executes <code>querySelector</code> on a given node.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Id of the node to query upon.</span></dd> <dt>selector</dt> <dd>String <span class='text'>Selector string.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Query selector result.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.querySelector DOM.querySelector(nodeId, selector, function callback(res) { // res = {nodeId} }); </pre> </div> <div id='DOM_querySelectorAll' class='command'> <h3>DOM.querySelectorAll <span class='label label-success'>Command</span></h3> <p>Executes <code>querySelectorAll</code> on a given node.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Id of the node to query upon.</span></dd> <dt>selector</dt> <dd>String <span class='text'>Selector string.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>nodeIds</dt> <dd>[<a href='#DOM.NodeId'>DOM.NodeId</a>] <span class='text'>Query selector result.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.querySelectorAll DOM.querySelectorAll(nodeId, selector, function callback(res) { // res = {nodeIds} }); </pre> </div> <div id='DOM_setNodeName' class='command'> <h3>DOM.setNodeName <span class='label label-success'>Command</span></h3> <p>Sets node name for a node with given id.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Id of the node to set name for.</span></dd> <dt>name</dt> <dd>String <span class='text'>New node's name.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>New node's id.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.setNodeName DOM.setNodeName(nodeId, name, function callback(res) { // res = {nodeId} }); </pre> </div> <div id='DOM_setNodeValue' class='command'> <h3>DOM.setNodeValue <span class='label label-success'>Command</span></h3> <p>Sets node value for a node with given id.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Id of the node to set value for.</span></dd> <dt>value</dt> <dd>String <span class='text'>New node's value.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.setNodeValue DOM.setNodeValue(nodeId, value); </pre> </div> <div id='DOM_removeNode' class='command'> <h3>DOM.removeNode <span class='label label-success'>Command</span></h3> <p>Removes node with given id.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Id of the node to remove.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.removeNode DOM.removeNode(nodeId); </pre> </div> <div id='DOM_setAttributeValue' class='command'> <h3>DOM.setAttributeValue <span class='label label-success'>Command</span></h3> <p>Sets attribute for an element with given id.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Id of the element to set attribute for.</span></dd> <dt>name</dt> <dd>String <span class='text'>Attribute name.</span></dd> <dt>value</dt> <dd>String <span class='text'>Attribute value.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.setAttributeValue DOM.setAttributeValue(nodeId, name, value); </pre> </div> <div id='DOM_setAttributesAsText' class='command'> <h3>DOM.setAttributesAsText <span class='label label-success'>Command</span></h3> <p>Sets attributes on element with given id. This method is useful when user edits some existing attribute value and types in several attribute name/value pairs.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Id of the element to set attributes for.</span></dd> <dt>text</dt> <dd>String <span class='text'>Text with a number of attributes. Will parse this text using HTML parser.</span></dd> <dt>name (optional)</dt> <dd>String <span class='text'>Attribute name to replace with new attributes derived from text in case text parsed successfully.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.setAttributesAsText DOM.setAttributesAsText(nodeId, text, name); </pre> </div> <div id='DOM_removeAttribute' class='command'> <h3>DOM.removeAttribute <span class='label label-success'>Command</span></h3> <p>Removes attribute with given name from an element with given id.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Id of the element to remove attribute from.</span></dd> <dt>name</dt> <dd>String <span class='text'>Name of the attribute to remove.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.removeAttribute DOM.removeAttribute(nodeId, name); </pre> </div> <div id='DOM_getEventListenersForNode' class='command'> <h3>DOM.getEventListenersForNode <span class='label label-success'>Command</span></h3> <p>Returns event listeners relevant to the node.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Id of the node to get listeners for.</span></dd> <dt>objectGroup (optional)</dt> <dd>String <span class='text'>Symbolic group name for handler value. Handler value is not returned without this parameter specified.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>listeners</dt> <dd>[<a href='#DOM.EventListener'>DOM.EventListener</a>] <span class='text'>Array of relevant listeners.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.getEventListenersForNode DOM.getEventListenersForNode(nodeId, objectGroup, function callback(res) { // res = {listeners} }); </pre> </div> <div id='DOM_getOuterHTML' class='command'> <h3>DOM.getOuterHTML <span class='label label-success'>Command</span></h3> <p>Returns node's HTML markup.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Id of the node to get markup for.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>outerHTML</dt> <dd>String <span class='text'>Outer HTML markup.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.getOuterHTML DOM.getOuterHTML(nodeId, function callback(res) { // res = {outerHTML} }); </pre> </div> <div id='DOM_setOuterHTML' class='command'> <h3>DOM.setOuterHTML <span class='label label-success'>Command</span></h3> <p>Sets node HTML markup, returns new node id.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Id of the node to set markup for.</span></dd> <dt>outerHTML</dt> <dd>String <span class='text'>Outer HTML markup to set.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.setOuterHTML DOM.setOuterHTML(nodeId, outerHTML); </pre> </div> <div id='DOM_performSearch' class='command'> <h3>DOM.performSearch <span class='label label-success'>Command</span></h3> <p>Searches for a given string in the DOM tree. Use <code>getSearchResults</code> to access search results or <code>cancelSearch</code> to end this search session.</p> <dl> <dt>query</dt> <dd>String <span class='text'>Plain text or query selector or XPath search query.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>searchId</dt> <dd>String <span class='text'>Unique search session identifier.</span></dd> <dt>resultCount</dt> <dd>Integer <span class='text'>Number of search results.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.performSearch DOM.performSearch(query, function callback(res) { // res = {searchId, resultCount} }); </pre> </div> <div id='DOM_getSearchResults' class='command'> <h3>DOM.getSearchResults <span class='label label-success'>Command</span></h3> <p>Returns search results from given <code>fromIndex</code> to given <code>toIndex</code> from the sarch with the given identifier.</p> <dl> <dt>searchId</dt> <dd>String <span class='text'>Unique search session identifier.</span></dd> <dt>fromIndex</dt> <dd>Integer <span class='text'>Start index of the search result to be returned.</span></dd> <dt>toIndex</dt> <dd>Integer <span class='text'>End index of the search result to be returned.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>nodeIds</dt> <dd>[<a href='#DOM.NodeId'>DOM.NodeId</a>] <span class='text'>Ids of the search result nodes.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.getSearchResults DOM.getSearchResults(searchId, fromIndex, toIndex, function callback(res) { // res = {nodeIds} }); </pre> </div> <div id='DOM_discardSearchResults' class='command'> <h3>DOM.discardSearchResults <span class='label label-success'>Command</span></h3> <p>Discards search results from the session with the given id. <code>getSearchResults</code> should no longer be called for that search.</p> <dl> <dt>searchId</dt> <dd>String <span class='text'>Unique search session identifier.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.discardSearchResults DOM.discardSearchResults(searchId); </pre> </div> <div id='DOM_requestNode' class='command'> <h3>DOM.requestNode <span class='label label-success'>Command</span></h3> <p>Requests that the node is sent to the caller given the JavaScript node object reference. All nodes that form the path from the node to the root are also sent to the client as a series of <code>setChildNodes</code> notifications.</p> <dl> <dt>objectId</dt> <dd><a href='#Runtime.RemoteObjectId'>Runtime.RemoteObjectId</a> <span class='text'>JavaScript object id to convert into node.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Node id for given object.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.requestNode DOM.requestNode(objectId, function callback(res) { // res = {nodeId} }); </pre> </div> <div id='DOM_setInspectModeEnabled' class='command'> <h3>DOM.setInspectModeEnabled <span class='label label-success'>Command</span></h3> <p>Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection.</p> <dl> <dt>enabled</dt> <dd>Boolean <span class='text'>True to enable inspection mode, false to disable it.</span></dd> <dt>inspectShadowDOM (optional)</dt> <dd>Boolean <span class='text'>True to enable inspection mode for shadow DOM.</span></dd> <dt>highlightConfig (optional)</dt> <dd><a href='#DOM.HighlightConfig'>DOM.HighlightConfig</a> <span class='text'>A descriptor for the highlight appearance of hovered-over nodes. May be omitted if <code>enabled == false</code>.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.setInspectModeEnabled DOM.setInspectModeEnabled(enabled, inspectShadowDOM, highlightConfig); </pre> </div> <div id='DOM_highlightRect' class='command'> <h3>DOM.highlightRect <span class='label label-success'>Command</span></h3> <p>Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.</p> <dl> <dt>x</dt> <dd>Integer <span class='text'>X coordinate</span></dd> <dt>y</dt> <dd>Integer <span class='text'>Y coordinate</span></dd> <dt>width</dt> <dd>Integer <span class='text'>Rectangle width</span></dd> <dt>height</dt> <dd>Integer <span class='text'>Rectangle height</span></dd> <dt>color (optional)</dt> <dd><a href='#DOM.RGBA'>DOM.RGBA</a> <span class='text'>The highlight fill color (default: transparent).</span></dd> <dt>outlineColor (optional)</dt> <dd><a href='#DOM.RGBA'>DOM.RGBA</a> <span class='text'>The highlight outline color (default: transparent).</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.highlightRect DOM.highlightRect(x, y, width, height, color, outlineColor); </pre> </div> <div id='DOM_highlightQuad' class='command'> <h3>DOM.highlightQuad <span class='label label-success'>Command</span></h3> <p>Highlights given quad. Coordinates are absolute with respect to the main frame viewport.</p> <dl> <dt>quad</dt> <dd><a href='#DOM.Quad'>DOM.Quad</a> <span class='text'>Quad to highlight</span></dd> <dt>color (optional)</dt> <dd><a href='#DOM.RGBA'>DOM.RGBA</a> <span class='text'>The highlight fill color (default: transparent).</span></dd> <dt>outlineColor (optional)</dt> <dd><a href='#DOM.RGBA'>DOM.RGBA</a> <span class='text'>The highlight outline color (default: transparent).</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.highlightQuad DOM.highlightQuad(quad, color, outlineColor); </pre> </div> <div id='DOM_highlightNode' class='command'> <h3>DOM.highlightNode <span class='label label-success'>Command</span></h3> <p>Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.</p> <dl> <dt>highlightConfig</dt> <dd><a href='#DOM.HighlightConfig'>DOM.HighlightConfig</a> <span class='text'>A descriptor for the highlight appearance.</span></dd> <dt>nodeId (optional)</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Identifier of the node to highlight.</span></dd> <dt>objectId (optional)</dt> <dd><a href='#Runtime.RemoteObjectId'>Runtime.RemoteObjectId</a> <span class='text'>JavaScript object id of the node to be highlighted.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.highlightNode DOM.highlightNode(highlightConfig, nodeId, objectId); </pre> </div> <div id='DOM_hideHighlight' class='command'> <h3>DOM.hideHighlight <span class='label label-success'>Command</span></h3> <p>Hides DOM node highlight.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.hideHighlight DOM.hideHighlight(); </pre> </div> <div id='DOM_highlightFrame' class='command'> <h3>DOM.highlightFrame <span class='label label-success'>Command</span></h3> <p>Highlights owner element of the frame with given id.</p> <dl> <dt>frameId</dt> <dd><a href='#Page.FrameId'>Page.FrameId</a> <span class='text'>Identifier of the frame to highlight.</span></dd> <dt>contentColor (optional)</dt> <dd><a href='#DOM.RGBA'>DOM.RGBA</a> <span class='text'>The content box highlight fill color (default: transparent).</span></dd> <dt>contentOutlineColor (optional)</dt> <dd><a href='#DOM.RGBA'>DOM.RGBA</a> <span class='text'>The content box highlight outline color (default: transparent).</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.highlightFrame DOM.highlightFrame(frameId, contentColor, contentOutlineColor); </pre> </div> <div id='DOM_pushNodeByPathToFrontend' class='command'> <h3>DOM.pushNodeByPathToFrontend <span class='label label-success'>Command</span></h3> <p>Requests that the node is sent to the caller given its path. // FIXME, use XPath</p> <dl> <dt>path</dt> <dd>String <span class='text'>Path to node in the proprietary format.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Id of the node for given path.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.pushNodeByPathToFrontend DOM.pushNodeByPathToFrontend(path, function callback(res) { // res = {nodeId} }); </pre> </div> <div id='DOM_pushNodeByBackendIdToFrontend' class='command'> <h3>DOM.pushNodeByBackendIdToFrontend <span class='label label-success'>Command</span></h3> <p>Requests that the node is sent to the caller given its backend node id.</p> <dl> <dt>backendNodeId</dt> <dd><a href='#DOM.BackendNodeId'>DOM.BackendNodeId</a> <span class='text'>The backend node id of the node.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>The pushed node's id.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.pushNodeByBackendIdToFrontend DOM.pushNodeByBackendIdToFrontend(backendNodeId, function callback(res) { // res = {nodeId} }); </pre> </div> <div id='DOM_releaseBackendNodeIds' class='command'> <h3>DOM.releaseBackendNodeIds <span class='label label-success'>Command</span></h3> <p>Requests that group of <code>BackendNodeIds</code> is released.</p> <dl> <dt>nodeGroup</dt> <dd>String <span class='text'>The backend node ids group name.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.releaseBackendNodeIds DOM.releaseBackendNodeIds(nodeGroup); </pre> </div> <div id='DOM_resolveNode' class='command'> <h3>DOM.resolveNode <span class='label label-success'>Command</span></h3> <p>Resolves JavaScript node object for given node id.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Id of the node to resolve.</span></dd> <dt>objectGroup (optional)</dt> <dd>String <span class='text'>Symbolic group name that can be used to release multiple objects.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>object</dt> <dd><a href='#Runtime.RemoteObject'>Runtime.RemoteObject</a> <span class='text'>JavaScript object wrapper for given node.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.resolveNode DOM.resolveNode(nodeId, objectGroup, function callback(res) { // res = {object} }); </pre> </div> <div id='DOM_getAttributes' class='command'> <h3>DOM.getAttributes <span class='label label-success'>Command</span></h3> <p>Returns attributes for the specified node.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Id of the node to retrieve attibutes for.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>attributes</dt> <dd>[String] <span class='text'>An interleaved array of node attribute names and values.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.getAttributes DOM.getAttributes(nodeId, function callback(res) { // res = {attributes} }); </pre> </div> <div id='DOM_moveTo' class='command'> <h3>DOM.moveTo <span class='label label-success'>Command</span></h3> <p>Moves node into the new container, places it before the given anchor.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Id of the node to drop.</span></dd> <dt>targetNodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Id of the element to drop into.</span></dd> <dt>insertBeforeNodeId (optional)</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Drop node before given one.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>New id of the moved node.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.moveTo DOM.moveTo(nodeId, targetNodeId, insertBeforeNodeId, function callback(res) { // res = {nodeId} }); </pre> </div> <div id='DOM_undo' class='command'> <h3>DOM.undo <span class='label label-success'>Command</span></h3> <p>Undoes the last performed action.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.undo DOM.undo(); </pre> </div> <div id='DOM_redo' class='command'> <h3>DOM.redo <span class='label label-success'>Command</span></h3> <p>Re-does the last undone action.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.redo DOM.redo(); </pre> </div> <div id='DOM_markUndoableState' class='command'> <h3>DOM.markUndoableState <span class='label label-success'>Command</span></h3> <p>Marks last undoable state.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.markUndoableState DOM.markUndoableState(); </pre> </div> <div id='DOM_focus' class='command'> <h3>DOM.focus <span class='label label-success'>Command</span></h3> <p>Focuses the given element.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Id of the node to focus.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.focus DOM.focus(nodeId); </pre> </div> <div id='DOM_setFileInputFiles' class='command'> <h3>DOM.setFileInputFiles <span class='label label-success'>Command</span></h3> <p>Sets files for the given file input element.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Id of the file input node to set files for.</span></dd> <dt>files</dt> <dd>[String] <span class='text'>Array of file paths to set.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.setFileInputFiles DOM.setFileInputFiles(nodeId, files); </pre> </div> <div id='DOM_getBoxModel' class='command'> <h3>DOM.getBoxModel <span class='label label-success'>Command</span></h3> <p>Returns boxes for the currently selected nodes.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Id of the node to get box model for.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>model</dt> <dd><a href='#DOM.BoxModel'>DOM.BoxModel</a> <span class='text'>Box model for the node.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.getBoxModel DOM.getBoxModel(nodeId, function callback(res) { // res = {model} }); </pre> </div> <div id='DOM_getNodeForLocation' class='command'> <h3>DOM.getNodeForLocation <span class='label label-success'>Command</span></h3> <p>Returns node id at given location.</p> <dl> <dt>x</dt> <dd>Integer <span class='text'>X coordinate.</span></dd> <dt>y</dt> <dd>Integer <span class='text'>Y coordinate.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Id of the node at given coordinates.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOM.getNodeForLocation DOM.getNodeForLocation(x, y, function callback(res) { // res = {nodeId} }); </pre> </div> <div id='DOM_documentUpdated' class='command'> <h3>DOM.documentUpdated <span class='label label-info'>Event</span></h3> <p>Fired when <code>Document</code> has been totally updated. Node ids are no longer valid.</p> <h4>Code Example:</h4> <pre> // WebInspector Event: DOM.documentUpdated function onDocumentUpdated(res) { // res = {} } </pre> </div> <div id='DOM_inspectNodeRequested' class='command'> <h3>DOM.inspectNodeRequested <span class='label label-info'>Event</span></h3> <p>Fired when the node should be inspected. This happens after call to <code>setInspectModeEnabled</code>.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Id of the node to inspect.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: DOM.inspectNodeRequested function onInspectNodeRequested(res) { // res = {nodeId} } </pre> </div> <div id='DOM_setChildNodes' class='command'> <h3>DOM.setChildNodes <span class='label label-info'>Event</span></h3> <p>Fired when backend wants to provide client with the missing DOM structure. This happens upon most of the calls requesting node ids.</p> <dl> <dt>parentId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Parent node id to populate with children.</span></dd> <dt>nodes</dt> <dd>[<a href='#DOM.Node'>DOM.Node</a>] <span class='text'>Child nodes array.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: DOM.setChildNodes function onSetChildNodes(res) { // res = {parentId, nodes} } </pre> </div> <div id='DOM_attributeModified' class='command'> <h3>DOM.attributeModified <span class='label label-info'>Event</span></h3> <p>Fired when <code>Element</code>'s attribute is modified.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Id of the node that has changed.</span></dd> <dt>name</dt> <dd>String <span class='text'>Attribute name.</span></dd> <dt>value</dt> <dd>String <span class='text'>Attribute value.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: DOM.attributeModified function onAttributeModified(res) { // res = {nodeId, name, value} } </pre> </div> <div id='DOM_attributeRemoved' class='command'> <h3>DOM.attributeRemoved <span class='label label-info'>Event</span></h3> <p>Fired when <code>Element</code>'s attribute is removed.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Id of the node that has changed.</span></dd> <dt>name</dt> <dd>String <span class='text'>A ttribute name.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: DOM.attributeRemoved function onAttributeRemoved(res) { // res = {nodeId, name} } </pre> </div> <div id='DOM_inlineStyleInvalidated' class='command'> <h3>DOM.inlineStyleInvalidated <span class='label label-info'>Event</span></h3> <p>Fired when <code>Element</code>'s inline style is modified via a CSS property modification.</p> <dl> <dt>nodeIds</dt> <dd>[<a href='#DOM.NodeId'>DOM.NodeId</a>] <span class='text'>Ids of the nodes for which the inline styles have been invalidated.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: DOM.inlineStyleInvalidated function onInlineStyleInvalidated(res) { // res = {nodeIds} } </pre> </div> <div id='DOM_characterDataModified' class='command'> <h3>DOM.characterDataModified <span class='label label-info'>Event</span></h3> <p>Mirrors <code>DOMCharacterDataModified</code> event.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Id of the node that has changed.</span></dd> <dt>characterData</dt> <dd>String <span class='text'>New text value.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: DOM.characterDataModified function onCharacterDataModified(res) { // res = {nodeId, characterData} } </pre> </div> <div id='DOM_childNodeCountUpdated' class='command'> <h3>DOM.childNodeCountUpdated <span class='label label-info'>Event</span></h3> <p>Fired when <code>Container</code>'s child node count has changed.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Id of the node that has changed.</span></dd> <dt>childNodeCount</dt> <dd>Integer <span class='text'>New node count.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: DOM.childNodeCountUpdated function onChildNodeCountUpdated(res) { // res = {nodeId, childNodeCount} } </pre> </div> <div id='DOM_childNodeInserted' class='command'> <h3>DOM.childNodeInserted <span class='label label-info'>Event</span></h3> <p>Mirrors <code>DOMNodeInserted</code> event.</p> <dl> <dt>parentNodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Id of the node that has changed.</span></dd> <dt>previousNodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>If of the previous siblint.</span></dd> <dt>node</dt> <dd><a href='#DOM.Node'>DOM.Node</a> <span class='text'>Inserted node data.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: DOM.childNodeInserted function onChildNodeInserted(res) { // res = {parentNodeId, previousNodeId, node} } </pre> </div> <div id='DOM_childNodeRemoved' class='command'> <h3>DOM.childNodeRemoved <span class='label label-info'>Event</span></h3> <p>Mirrors <code>DOMNodeRemoved</code> event.</p> <dl> <dt>parentNodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Parent id.</span></dd> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Id of the node that has been removed.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: DOM.childNodeRemoved function onChildNodeRemoved(res) { // res = {parentNodeId, nodeId} } </pre> </div> <div id='DOM_shadowRootPushed' class='command'> <h3>DOM.shadowRootPushed <span class='label label-info'>Event</span></h3> <p>Called when shadow root is pushed into the element.</p> <dl> <dt>hostId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Host element id.</span></dd> <dt>root</dt> <dd><a href='#DOM.Node'>DOM.Node</a> <span class='text'>Shadow root.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: DOM.shadowRootPushed function onShadowRootPushed(res) { // res = {hostId, root} } </pre> </div> <div id='DOM_shadowRootPopped' class='command'> <h3>DOM.shadowRootPopped <span class='label label-info'>Event</span></h3> <p>Called when shadow root is popped from the element.</p> <dl> <dt>hostId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Host element id.</span></dd> <dt>rootId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Shadow root id.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: DOM.shadowRootPopped function onShadowRootPopped(res) { // res = {hostId, rootId} } </pre> </div> <div id='DOM_pseudoElementAdded' class='command'> <h3>DOM.pseudoElementAdded <span class='label label-info'>Event</span></h3> <p>Called when a pseudo element is added to an element.</p> <dl> <dt>parentId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Pseudo element's parent element id.</span></dd> <dt>pseudoElement</dt> <dd><a href='#DOM.Node'>DOM.Node</a> <span class='text'>The added pseudo element.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: DOM.pseudoElementAdded function onPseudoElementAdded(res) { // res = {parentId, pseudoElement} } </pre> </div> <div id='DOM_pseudoElementRemoved' class='command'> <h3>DOM.pseudoElementRemoved <span class='label label-info'>Event</span></h3> <p>Called when a pseudo element is removed from an element.</p> <dl> <dt>parentId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Pseudo element's parent element id.</span></dd> <dt>pseudoElementId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>The removed pseudo element id.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: DOM.pseudoElementRemoved function onPseudoElementRemoved(res) { // res = {parentId, pseudoElementId} } </pre> </div> </section> <section id='DOMDebugger' class='domain'> <h1>DOMDebugger</h1> <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> <span class='label'>Type</span> <ul> <li><a href='#DOMDebugger.DOMBreakpointType'>DOMDebugger.DOMBreakpointType</a>: DOM breakpoint type.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#DOMDebugger.setDOMBreakpoint'>DOMDebugger.setDOMBreakpoint</a>: Sets breakpoint on particular operation with DOM.</li> <li><a href='#DOMDebugger.removeDOMBreakpoint'>DOMDebugger.removeDOMBreakpoint</a>: Removes DOM breakpoint that was set using setDOMBreakpoint.</li> <li><a href='#DOMDebugger.setEventListenerBreakpoint'>DOMDebugger.setEventListenerBreakpoint</a>: Sets breakpoint on particular DOM event.</li> <li><a href='#DOMDebugger.removeEventListenerBreakpoint'>DOMDebugger.removeEventListenerBreakpoint</a>: Removes breakpoint on particular DOM event.</li> <li><a href='#DOMDebugger.setInstrumentationBreakpoint'>DOMDebugger.setInstrumentationBreakpoint</a>: Sets breakpoint on particular native event.</li> <li><a href='#DOMDebugger.removeInstrumentationBreakpoint'>DOMDebugger.removeInstrumentationBreakpoint</a>: Removes breakpoint on particular native event.</li> <li><a href='#DOMDebugger.setXHRBreakpoint'>DOMDebugger.setXHRBreakpoint</a>: Sets breakpoint on XMLHttpRequest.</li> <li><a href='#DOMDebugger.removeXHRBreakpoint'>DOMDebugger.removeXHRBreakpoint</a>: Removes breakpoint from XMLHttpRequest.</li> </ul> <div id='DOMDebugger_DOMBreakpointType' class='type'> <h3>DOMDebugger.DOMBreakpointType <span class='label'>Type</span></h3> <p>DOM breakpoint type.</p> <dl> <dd>( subtree-modified | attribute-modified | node-removed )</dd> </dl> </div> <div id='DOMDebugger_setDOMBreakpoint' class='command'> <h3>DOMDebugger.setDOMBreakpoint <span class='label label-success'>Command</span></h3> <p>Sets breakpoint on particular operation with DOM.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Identifier of the node to set breakpoint on.</span></dd> <dt>type</dt> <dd><a href='#DOMDebugger.DOMBreakpointType'>DOMDebugger.DOMBreakpointType</a> <span class='text'>Type of the operation to stop upon.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOMDebugger.setDOMBreakpoint DOMDebugger.setDOMBreakpoint(nodeId, type); </pre> </div> <div id='DOMDebugger_removeDOMBreakpoint' class='command'> <h3>DOMDebugger.removeDOMBreakpoint <span class='label label-success'>Command</span></h3> <p>Removes DOM breakpoint that was set using <code>setDOMBreakpoint</code>.</p> <dl> <dt>nodeId</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Identifier of the node to remove breakpoint from.</span></dd> <dt>type</dt> <dd><a href='#DOMDebugger.DOMBreakpointType'>DOMDebugger.DOMBreakpointType</a> <span class='text'>Type of the breakpoint to remove.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOMDebugger.removeDOMBreakpoint DOMDebugger.removeDOMBreakpoint(nodeId, type); </pre> </div> <div id='DOMDebugger_setEventListenerBreakpoint' class='command'> <h3>DOMDebugger.setEventListenerBreakpoint <span class='label label-success'>Command</span></h3> <p>Sets breakpoint on particular DOM event.</p> <dl> <dt>eventName</dt> <dd>String <span class='text'>DOM Event name to stop on (any DOM event will do).</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOMDebugger.setEventListenerBreakpoint DOMDebugger.setEventListenerBreakpoint(eventName); </pre> </div> <div id='DOMDebugger_removeEventListenerBreakpoint' class='command'> <h3>DOMDebugger.removeEventListenerBreakpoint <span class='label label-success'>Command</span></h3> <p>Removes breakpoint on particular DOM event.</p> <dl> <dt>eventName</dt> <dd>String <span class='text'>Event name.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOMDebugger.removeEventListenerBreakpoint DOMDebugger.removeEventListenerBreakpoint(eventName); </pre> </div> <div id='DOMDebugger_setInstrumentationBreakpoint' class='command'> <h3>DOMDebugger.setInstrumentationBreakpoint <span class='label label-success'>Command</span></h3> <p>Sets breakpoint on particular native event.</p> <dl> <dt>eventName</dt> <dd>String <span class='text'>Instrumentation name to stop on.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOMDebugger.setInstrumentationBreakpoint DOMDebugger.setInstrumentationBreakpoint(eventName); </pre> </div> <div id='DOMDebugger_removeInstrumentationBreakpoint' class='command'> <h3>DOMDebugger.removeInstrumentationBreakpoint <span class='label label-success'>Command</span></h3> <p>Removes breakpoint on particular native event.</p> <dl> <dt>eventName</dt> <dd>String <span class='text'>Instrumentation name to stop on.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOMDebugger.removeInstrumentationBreakpoint DOMDebugger.removeInstrumentationBreakpoint(eventName); </pre> </div> <div id='DOMDebugger_setXHRBreakpoint' class='command'> <h3>DOMDebugger.setXHRBreakpoint <span class='label label-success'>Command</span></h3> <p>Sets breakpoint on XMLHttpRequest.</p> <dl> <dt>url</dt> <dd>String <span class='text'>Resource URL substring. All XHRs having this substring in the URL will get stopped upon.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOMDebugger.setXHRBreakpoint DOMDebugger.setXHRBreakpoint(url); </pre> </div> <div id='DOMDebugger_removeXHRBreakpoint' class='command'> <h3>DOMDebugger.removeXHRBreakpoint <span class='label label-success'>Command</span></h3> <p>Removes breakpoint from XMLHttpRequest.</p> <dl> <dt>url</dt> <dd>String <span class='text'>Resource URL substring.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOMDebugger.removeXHRBreakpoint DOMDebugger.removeXHRBreakpoint(url); </pre> </div> </section> <section id='DOMStorage' class='domain'> <h1>DOMStorage</h1> <p>Query and modify DOM storage.</p> <span class='label'>Type</span> <ul> <li><a href='#DOMStorage.StorageId'>DOMStorage.StorageId</a>: DOM Storage identifier.</li> <li><a href='#DOMStorage.Item'>DOMStorage.Item</a>: DOM Storage item.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#DOMStorage.enable'>DOMStorage.enable</a>: Enables storage tracking, storage events will now be delivered to the client.</li> <li><a href='#DOMStorage.disable'>DOMStorage.disable</a>: Disables storage tracking, prevents storage events from being sent to the client.</li> <li><a href='#DOMStorage.getDOMStorageItems'>DOMStorage.getDOMStorageItems</a></li> <li><a href='#DOMStorage.setDOMStorageItem'>DOMStorage.setDOMStorageItem</a></li> <li><a href='#DOMStorage.removeDOMStorageItem'>DOMStorage.removeDOMStorageItem</a></li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#DOMStorage.domStorageItemsCleared'>DOMStorage.domStorageItemsCleared</a></li> <li><a href='#DOMStorage.domStorageItemRemoved'>DOMStorage.domStorageItemRemoved</a></li> <li><a href='#DOMStorage.domStorageItemAdded'>DOMStorage.domStorageItemAdded</a></li> <li><a href='#DOMStorage.domStorageItemUpdated'>DOMStorage.domStorageItemUpdated</a></li> </ul> <div id='DOMStorage_StorageId' class='type'> <h3>DOMStorage.StorageId <span class='label'>Type</span></h3> <p>DOM Storage identifier.</p> <dl> <dt>securityOrigin</dt> <dd>String <span class='text'>Security origin for the storage.</span></dd> <dt>isLocalStorage</dt> <dd>Boolean <span class='text'>Whether the storage is local storage (not session storage).</span></dd> </dl> </div> <div id='DOMStorage_Item' class='type'> <h3>DOMStorage.Item <span class='label'>Type</span></h3> <p>DOM Storage item.</p> <dl> <dd>[String]</dd> </dl> </div> <div id='DOMStorage_enable' class='command'> <h3>DOMStorage.enable <span class='label label-success'>Command</span></h3> <p>Enables storage tracking, storage events will now be delivered to the client.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: DOMStorage.enable DOMStorage.enable(); </pre> </div> <div id='DOMStorage_disable' class='command'> <h3>DOMStorage.disable <span class='label label-success'>Command</span></h3> <p>Disables storage tracking, prevents storage events from being sent to the client.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: DOMStorage.disable DOMStorage.disable(); </pre> </div> <div id='DOMStorage_getDOMStorageItems' class='command'> <h3>DOMStorage.getDOMStorageItems <span class='label label-success'>Command</span></h3> <dl> <dt>storageId</dt> <dd><a href='#DOMStorage.StorageId'>DOMStorage.StorageId</a></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>entries</dt> <dd>[<a href='#DOMStorage.Item'>DOMStorage.Item</a>]</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOMStorage.getDOMStorageItems DOMStorage.getDOMStorageItems(storageId, function callback(res) { // res = {entries} }); </pre> </div> <div id='DOMStorage_setDOMStorageItem' class='command'> <h3>DOMStorage.setDOMStorageItem <span class='label label-success'>Command</span></h3> <dl> <dt>storageId</dt> <dd><a href='#DOMStorage.StorageId'>DOMStorage.StorageId</a></dd> <dt>key</dt> <dd>String</dd> <dt>value</dt> <dd>String</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOMStorage.setDOMStorageItem DOMStorage.setDOMStorageItem(storageId, key, value); </pre> </div> <div id='DOMStorage_removeDOMStorageItem' class='command'> <h3>DOMStorage.removeDOMStorageItem <span class='label label-success'>Command</span></h3> <dl> <dt>storageId</dt> <dd><a href='#DOMStorage.StorageId'>DOMStorage.StorageId</a></dd> <dt>key</dt> <dd>String</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: DOMStorage.removeDOMStorageItem DOMStorage.removeDOMStorageItem(storageId, key); </pre> </div> <div id='DOMStorage_domStorageItemsCleared' class='command'> <h3>DOMStorage.domStorageItemsCleared <span class='label label-info'>Event</span></h3> <dl> <dt>storageId</dt> <dd><a href='#DOMStorage.StorageId'>DOMStorage.StorageId</a></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: DOMStorage.domStorageItemsCleared function onDomStorageItemsCleared(res) { // res = {storageId} } </pre> </div> <div id='DOMStorage_domStorageItemRemoved' class='command'> <h3>DOMStorage.domStorageItemRemoved <span class='label label-info'>Event</span></h3> <dl> <dt>storageId</dt> <dd><a href='#DOMStorage.StorageId'>DOMStorage.StorageId</a></dd> <dt>key</dt> <dd>String</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: DOMStorage.domStorageItemRemoved function onDomStorageItemRemoved(res) { // res = {storageId, key} } </pre> </div> <div id='DOMStorage_domStorageItemAdded' class='command'> <h3>DOMStorage.domStorageItemAdded <span class='label label-info'>Event</span></h3> <dl> <dt>storageId</dt> <dd><a href='#DOMStorage.StorageId'>DOMStorage.StorageId</a></dd> <dt>key</dt> <dd>String</dd> <dt>newValue</dt> <dd>String</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: DOMStorage.domStorageItemAdded function onDomStorageItemAdded(res) { // res = {storageId, key, newValue} } </pre> </div> <div id='DOMStorage_domStorageItemUpdated' class='command'> <h3>DOMStorage.domStorageItemUpdated <span class='label label-info'>Event</span></h3> <dl> <dt>storageId</dt> <dd><a href='#DOMStorage.StorageId'>DOMStorage.StorageId</a></dd> <dt>key</dt> <dd>String</dd> <dt>oldValue</dt> <dd>String</dd> <dt>newValue</dt> <dd>String</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: DOMStorage.domStorageItemUpdated function onDomStorageItemUpdated(res) { // res = {storageId, key, oldValue, newValue} } </pre> </div> </section> <section id='Database' class='domain'> <h1>Database</h1> <p></p> <span class='label'>Type</span> <ul> <li><a href='#Database.DatabaseId'>Database.DatabaseId</a>: Unique identifier of Database object.</li> <li><a href='#Database.Database'>Database.Database</a>: Database object.</li> <li><a href='#Database.Error'>Database.Error</a>: Database error.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#Database.enable'>Database.enable</a>: Enables database tracking, database events will now be delivered to the client.</li> <li><a href='#Database.disable'>Database.disable</a>: Disables database tracking, prevents database events from being sent to the client.</li> <li><a href='#Database.getDatabaseTableNames'>Database.getDatabaseTableNames</a></li> <li><a href='#Database.executeSQL'>Database.executeSQL</a></li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#Database.addDatabase'>Database.addDatabase</a></li> </ul> <div id='Database_DatabaseId' class='type'> <h3>Database.DatabaseId <span class='label'>Type</span></h3> <p>Unique identifier of Database object.</p> <dl> <dd>String</dd> </dl> </div> <div id='Database_Database' class='type'> <h3>Database.Database <span class='label'>Type</span></h3> <p>Database object.</p> <dl> <dt>id</dt> <dd><a href='#Database.DatabaseId'>Database.DatabaseId</a> <span class='text'>Database ID.</span></dd> <dt>domain</dt> <dd>String <span class='text'>Database domain.</span></dd> <dt>name</dt> <dd>String <span class='text'>Database name.</span></dd> <dt>version</dt> <dd>String <span class='text'>Database version.</span></dd> </dl> </div> <div id='Database_Error' class='type'> <h3>Database.Error <span class='label'>Type</span></h3> <p>Database error.</p> <dl> <dt>message</dt> <dd>String <span class='text'>Error message.</span></dd> <dt>code</dt> <dd>Integer <span class='text'>Error code.</span></dd> </dl> </div> <div id='Database_enable' class='command'> <h3>Database.enable <span class='label label-success'>Command</span></h3> <p>Enables database tracking, database events will now be delivered to the client.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Database.enable Database.enable(); </pre> </div> <div id='Database_disable' class='command'> <h3>Database.disable <span class='label label-success'>Command</span></h3> <p>Disables database tracking, prevents database events from being sent to the client.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Database.disable Database.disable(); </pre> </div> <div id='Database_getDatabaseTableNames' class='command'> <h3>Database.getDatabaseTableNames <span class='label label-success'>Command</span></h3> <dl> <dt>databaseId</dt> <dd><a href='#Database.DatabaseId'>Database.DatabaseId</a></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>tableNames</dt> <dd>[String]</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Database.getDatabaseTableNames Database.getDatabaseTableNames(databaseId, function callback(res) { // res = {tableNames} }); </pre> </div> <div id='Database_executeSQL' class='command'> <h3>Database.executeSQL <span class='label label-success'>Command</span></h3> <dl> <dt>databaseId</dt> <dd><a href='#Database.DatabaseId'>Database.DatabaseId</a></dd> <dt>query</dt> <dd>String</dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>columnNames (optional)</dt> <dd>[String]</dd> <dt>values (optional)</dt> <dd>[Any]</dd> <dt>sqlError (optional)</dt> <dd><a href='#Database.Error'>Database.Error</a></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Database.executeSQL Database.executeSQL(databaseId, query, function callback(res) { // res = {columnNames, values, sqlError} }); </pre> </div> <div id='Database_addDatabase' class='command'> <h3>Database.addDatabase <span class='label label-info'>Event</span></h3> <dl> <dt>database</dt> <dd><a href='#Database.Database'>Database.Database</a></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Database.addDatabase function onAddDatabase(res) { // res = {database} } </pre> </div> </section> <section id='Debugger' class='domain'> <h1>Debugger</h1> <p>Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing breakpoints, stepping through execution, exploring stack traces, etc.</p> <span class='label'>Type</span> <ul> <li><a href='#Debugger.BreakpointId'>Debugger.BreakpointId</a>: Breakpoint identifier.</li> <li><a href='#Debugger.ScriptId'>Debugger.ScriptId</a>: Unique script identifier.</li> <li><a href='#Debugger.CallFrameId'>Debugger.CallFrameId</a>: Call frame identifier.</li> <li><a href='#Debugger.Location'>Debugger.Location</a>: Location in the source code.</li> <li><a href='#Debugger.FunctionDetails'>Debugger.FunctionDetails</a>: Information about the function.</li> <li><a href='#Debugger.CallFrame'>Debugger.CallFrame</a>: JavaScript call frame. Array of call frames form the call stack.</li> <li><a href='#Debugger.Scope'>Debugger.Scope</a>: Scope description.</li> <li><a href='#Debugger.SetScriptSourceError'>Debugger.SetScriptSourceError</a>: Error data for setScriptSource command. compileError is a case type for uncompilable script source error.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#Debugger.enable'>Debugger.enable</a>: Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.</li> <li><a href='#Debugger.disable'>Debugger.disable</a>: Disables debugger for given page.</li> <li><a href='#Debugger.setBreakpointsActive'>Debugger.setBreakpointsActive</a>: Activates / deactivates all breakpoints on the page.</li> <li><a href='#Debugger.setSkipAllPauses'>Debugger.setSkipAllPauses</a>: Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).</li> <li><a href='#Debugger.setBreakpointByUrl'>Debugger.setBreakpointByUrl</a>: Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in locations property. Further matching script parsing will result in subsequent breakpointResolved events issued. This logical breakpoint will survive page reloads.</li> <li><a href='#Debugger.setBreakpoint'>Debugger.setBreakpoint</a>: Sets JavaScript breakpoint at a given location.</li> <li><a href='#Debugger.removeBreakpoint'>Debugger.removeBreakpoint</a>: Removes JavaScript breakpoint.</li> <li><a href='#Debugger.continueToLocation'>Debugger.continueToLocation</a>: Continues execution until specific location is reached.</li> <li><a href='#Debugger.stepOver'>Debugger.stepOver</a>: Steps over the statement.</li> <li><a href='#Debugger.stepInto'>Debugger.stepInto</a>: Steps into the function call.</li> <li><a href='#Debugger.stepOut'>Debugger.stepOut</a>: Steps out of the function call.</li> <li><a href='#Debugger.pause'>Debugger.pause</a>: Stops on the next JavaScript statement.</li> <li><a href='#Debugger.resume'>Debugger.resume</a>: Resumes JavaScript execution.</li> <li><a href='#Debugger.searchInContent'>Debugger.searchInContent</a>: Searches for given string in script content.</li> <li><a href='#Debugger.canSetScriptSource'>Debugger.canSetScriptSource</a>: Always returns true.</li> <li><a href='#Debugger.setScriptSource'>Debugger.setScriptSource</a>: Edits JavaScript source live.</li> <li><a href='#Debugger.restartFrame'>Debugger.restartFrame</a>: Restarts particular call frame from the beginning.</li> <li><a href='#Debugger.getScriptSource'>Debugger.getScriptSource</a>: Returns source for the script with given id.</li> <li><a href='#Debugger.getFunctionDetails'>Debugger.getFunctionDetails</a>: Returns detailed informtation on given function.</li> <li><a href='#Debugger.setPauseOnExceptions'>Debugger.setPauseOnExceptions</a>: Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is none.</li> <li><a href='#Debugger.evaluateOnCallFrame'>Debugger.evaluateOnCallFrame</a>: Evaluates expression on a given call frame.</li> <li><a href='#Debugger.compileScript'>Debugger.compileScript</a>: Compiles expression.</li> <li><a href='#Debugger.runScript'>Debugger.runScript</a>: Runs script with given id in a given context.</li> <li><a href='#Debugger.setOverlayMessage'>Debugger.setOverlayMessage</a>: Sets overlay message.</li> <li><a href='#Debugger.setVariableValue'>Debugger.setVariableValue</a>: Changes value of variable in a callframe or a closure. Either callframe or function must be specified. Object-based scopes are not supported and must be mutated manually.</li> <li><a href='#Debugger.getStepInPositions'>Debugger.getStepInPositions</a>: Lists all positions where step-in is possible for a current statement in a specified call frame</li> <li><a href='#Debugger.getBacktrace'>Debugger.getBacktrace</a>: Returns call stack including variables changed since VM was paused. VM must be paused.</li> <li><a href='#Debugger.skipStackFrames'>Debugger.skipStackFrames</a>: Makes backend skip steps in the sources with names matching given pattern. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.</li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#Debugger.globalObjectCleared'>Debugger.globalObjectCleared</a>: Called when global has been cleared and debugger client should reset its state. Happens upon navigation or reload.</li> <li><a href='#Debugger.scriptParsed'>Debugger.scriptParsed</a>: Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.</li> <li><a href='#Debugger.scriptFailedToParse'>Debugger.scriptFailedToParse</a>: Fired when virtual machine fails to parse the script.</li> <li><a href='#Debugger.breakpointResolved'>Debugger.breakpointResolved</a>: Fired when breakpoint is resolved to an actual script and location.</li> <li><a href='#Debugger.paused'>Debugger.paused</a>: Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.</li> <li><a href='#Debugger.resumed'>Debugger.resumed</a>: Fired when the virtual machine resumed execution.</li> </ul> <div id='Debugger_BreakpointId' class='type'> <h3>Debugger.BreakpointId <span class='label'>Type</span></h3> <p>Breakpoint identifier.</p> <dl> <dd>String</dd> </dl> </div> <div id='Debugger_ScriptId' class='type'> <h3>Debugger.ScriptId <span class='label'>Type</span></h3> <p>Unique script identifier.</p> <dl> <dd>String</dd> </dl> </div> <div id='Debugger_CallFrameId' class='type'> <h3>Debugger.CallFrameId <span class='label'>Type</span></h3> <p>Call frame identifier.</p> <dl> <dd>String</dd> </dl> </div> <div id='Debugger_Location' class='type'> <h3>Debugger.Location <span class='label'>Type</span></h3> <p>Location in the source code.</p> <dl> <dt>scriptId</dt> <dd><a href='#Debugger.ScriptId'>Debugger.ScriptId</a> <span class='text'>Script identifier as reported in the <code>Debugger.scriptParsed</code>.</span></dd> <dt>lineNumber</dt> <dd>Integer <span class='text'>Line number in the script (0-based).</span></dd> <dt>columnNumber (optional)</dt> <dd>Integer <span class='text'>Column number in the script (0-based).</span></dd> </dl> </div> <div id='Debugger_FunctionDetails' class='type'> <h3>Debugger.FunctionDetails <span class='label'>Type</span></h3> <p>Information about the function.</p> <dl> <dt>location</dt> <dd><a href='#Debugger.Location'>Debugger.Location</a> <span class='text'>Location of the function.</span></dd> <dt>name (optional)</dt> <dd>String <span class='text'>Name of the function. Not present for anonymous functions.</span></dd> <dt>displayName (optional)</dt> <dd>String <span class='text'>Display name of the function(specified in 'displayName' property on the function object).</span></dd> <dt>inferredName (optional)</dt> <dd>String <span class='text'>Name of the function inferred from its initial assignment.</span></dd> <dt>scopeChain (optional)</dt> <dd>[<a href='#Debugger.Scope'>Debugger.Scope</a>] <span class='text'>Scope chain for this closure.</span></dd> </dl> </div> <div id='Debugger_CallFrame' class='type'> <h3>Debugger.CallFrame <span class='label'>Type</span></h3> <p>JavaScript call frame. Array of call frames form the call stack.</p> <dl> <dt>callFrameId</dt> <dd><a href='#Debugger.CallFrameId'>Debugger.CallFrameId</a> <span class='text'>Call frame identifier. This identifier is only valid while the virtual machine is paused.</span></dd> <dt>functionName</dt> <dd>String <span class='text'>Name of the JavaScript function called on this call frame.</span></dd> <dt>location</dt> <dd><a href='#Debugger.Location'>Debugger.Location</a> <span class='text'>Location in the source code.</span></dd> <dt>scopeChain</dt> <dd>[<a href='#Debugger.Scope'>Debugger.Scope</a>] <span class='text'>Scope chain for this call frame.</span></dd> <dt>this</dt> <dd><a href='#Runtime.RemoteObject'>Runtime.RemoteObject</a> <span class='text'><code>this</code> object for this call frame.</span></dd> </dl> </div> <div id='Debugger_Scope' class='type'> <h3>Debugger.Scope <span class='label'>Type</span></h3> <p>Scope description.</p> <dl> <dt>type</dt> <dd>( global | local | with | closure | catch ) <span class='text'>Scope type.</span></dd> <dt>object</dt> <dd><a href='#Runtime.RemoteObject'>Runtime.RemoteObject</a> <span class='text'>Object representing the scope. For <code>global</code> and <code>with</code> scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties.</span></dd> </dl> </div> <div id='Debugger_SetScriptSourceError' class='type'> <h3>Debugger.SetScriptSourceError <span class='label'>Type</span></h3> <p>Error data for setScriptSource command. compileError is a case type for uncompilable script source error.</p> <dl> <dt>compileError (optional)</dt> <dd>Object</dd> </dl> </div> <div id='Debugger_enable' class='command'> <h3>Debugger.enable <span class='label label-success'>Command</span></h3> <p>Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Debugger.enable Debugger.enable(); </pre> </div> <div id='Debugger_disable' class='command'> <h3>Debugger.disable <span class='label label-success'>Command</span></h3> <p>Disables debugger for given page.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Debugger.disable Debugger.disable(); </pre> </div> <div id='Debugger_setBreakpointsActive' class='command'> <h3>Debugger.setBreakpointsActive <span class='label label-success'>Command</span></h3> <p>Activates / deactivates all breakpoints on the page.</p> <dl> <dt>active</dt> <dd>Boolean <span class='text'>New value for breakpoints active state.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Debugger.setBreakpointsActive Debugger.setBreakpointsActive(active); </pre> </div> <div id='Debugger_setSkipAllPauses' class='command'> <h3>Debugger.setSkipAllPauses <span class='label label-success'>Command</span></h3> <p>Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).</p> <dl> <dt>skipped</dt> <dd>Boolean <span class='text'>New value for skip pauses state.</span></dd> <dt>untilReload (optional)</dt> <dd>Boolean <span class='text'>Whether page reload should set skipped to false.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Debugger.setSkipAllPauses Debugger.setSkipAllPauses(skipped, untilReload); </pre> </div> <div id='Debugger_setBreakpointByUrl' class='command'> <h3>Debugger.setBreakpointByUrl <span class='label label-success'>Command</span></h3> <p>Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in <code>locations</code> property. Further matching script parsing will result in subsequent <code>breakpointResolved</code> events issued. This logical breakpoint will survive page reloads.</p> <dl> <dt>lineNumber</dt> <dd>Integer <span class='text'>Line number to set breakpoint at.</span></dd> <dt>url (optional)</dt> <dd>String <span class='text'>URL of the resources to set breakpoint on.</span></dd> <dt>urlRegex (optional)</dt> <dd>String <span class='text'>Regex pattern for the URLs of the resources to set breakpoints on. Either <code>url</code> or <code>urlRegex</code> must be specified.</span></dd> <dt>columnNumber (optional)</dt> <dd>Integer <span class='text'>Offset in the line to set breakpoint at.</span></dd> <dt>condition (optional)</dt> <dd>String <span class='text'>Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.</span></dd> <dt>isAntibreakpoint (optional)</dt> <dd>Boolean <span class='text'>Creates pseudo-breakpoint that prevents debugger from pausing on exception at this location.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>breakpointId</dt> <dd><a href='#Debugger.BreakpointId'>Debugger.BreakpointId</a> <span class='text'>Id of the created breakpoint for further reference.</span></dd> <dt>locations</dt> <dd>[<a href='#Debugger.Location'>Debugger.Location</a>] <span class='text'>List of the locations this breakpoint resolved into upon addition.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Debugger.setBreakpointByUrl Debugger.setBreakpointByUrl(lineNumber, url, urlRegex, columnNumber, condition, isAntibreakpoint, function callback(res) { // res = {breakpointId, locations} }); </pre> </div> <div id='Debugger_setBreakpoint' class='command'> <h3>Debugger.setBreakpoint <span class='label label-success'>Command</span></h3> <p>Sets JavaScript breakpoint at a given location.</p> <dl> <dt>location</dt> <dd><a href='#Debugger.Location'>Debugger.Location</a> <span class='text'>Location to set breakpoint in.</span></dd> <dt>condition (optional)</dt> <dd>String <span class='text'>Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>breakpointId</dt> <dd><a href='#Debugger.BreakpointId'>Debugger.BreakpointId</a> <span class='text'>Id of the created breakpoint for further reference.</span></dd> <dt>actualLocation</dt> <dd><a href='#Debugger.Location'>Debugger.Location</a> <span class='text'>Location this breakpoint resolved into.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Debugger.setBreakpoint Debugger.setBreakpoint(location, condition, function callback(res) { // res = {breakpointId, actualLocation} }); </pre> </div> <div id='Debugger_removeBreakpoint' class='command'> <h3>Debugger.removeBreakpoint <span class='label label-success'>Command</span></h3> <p>Removes JavaScript breakpoint.</p> <dl> <dt>breakpointId</dt> <dd><a href='#Debugger.BreakpointId'>Debugger.BreakpointId</a></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Debugger.removeBreakpoint Debugger.removeBreakpoint(breakpointId); </pre> </div> <div id='Debugger_continueToLocation' class='command'> <h3>Debugger.continueToLocation <span class='label label-success'>Command</span></h3> <p>Continues execution until specific location is reached.</p> <dl> <dt>location</dt> <dd><a href='#Debugger.Location'>Debugger.Location</a> <span class='text'>Location to continue to.</span></dd> <dt>interstatementLocation (optional)</dt> <dd>Boolean <span class='text'>Allows breakpoints at the intemediate positions inside statements.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Debugger.continueToLocation Debugger.continueToLocation(location, interstatementLocation); </pre> </div> <div id='Debugger_stepOver' class='command'> <h3>Debugger.stepOver <span class='label label-success'>Command</span></h3> <p>Steps over the statement.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Debugger.stepOver Debugger.stepOver(); </pre> </div> <div id='Debugger_stepInto' class='command'> <h3>Debugger.stepInto <span class='label label-success'>Command</span></h3> <p>Steps into the function call.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Debugger.stepInto Debugger.stepInto(); </pre> </div> <div id='Debugger_stepOut' class='command'> <h3>Debugger.stepOut <span class='label label-success'>Command</span></h3> <p>Steps out of the function call.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Debugger.stepOut Debugger.stepOut(); </pre> </div> <div id='Debugger_pause' class='command'> <h3>Debugger.pause <span class='label label-success'>Command</span></h3> <p>Stops on the next JavaScript statement.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Debugger.pause Debugger.pause(); </pre> </div> <div id='Debugger_resume' class='command'> <h3>Debugger.resume <span class='label label-success'>Command</span></h3> <p>Resumes JavaScript execution.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Debugger.resume Debugger.resume(); </pre> </div> <div id='Debugger_searchInContent' class='command'> <h3>Debugger.searchInContent <span class='label label-success'>Command</span></h3> <p>Searches for given string in script content.</p> <dl> <dt>scriptId</dt> <dd><a href='#Debugger.ScriptId'>Debugger.ScriptId</a> <span class='text'>Id of the script to search in.</span></dd> <dt>query</dt> <dd>String <span class='text'>String to search for.</span></dd> <dt>caseSensitive (optional)</dt> <dd>Boolean <span class='text'>If true, search is case sensitive.</span></dd> <dt>isRegex (optional)</dt> <dd>Boolean <span class='text'>If true, treats string parameter as regex.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>result</dt> <dd>[<a href='#Page.SearchMatch'>Page.SearchMatch</a>] <span class='text'>List of search matches.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Debugger.searchInContent Debugger.searchInContent(scriptId, query, caseSensitive, isRegex, function callback(res) { // res = {result} }); </pre> </div> <div id='Debugger_canSetScriptSource' class='command'> <h3>Debugger.canSetScriptSource <span class='label label-success'>Command</span></h3> <p>Always returns true.</p> <h4>Callback Parameters:</h4> <dl> <dt>result</dt> <dd>Boolean <span class='text'>True if <code>setScriptSource</code> is supported.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Debugger.canSetScriptSource Debugger.canSetScriptSource(function callback(res) { // res = {result} }); </pre> </div> <div id='Debugger_setScriptSource' class='command'> <h3>Debugger.setScriptSource <span class='label label-success'>Command</span></h3> <p>Edits JavaScript source live.</p> <dl> <dt>scriptId</dt> <dd><a href='#Debugger.ScriptId'>Debugger.ScriptId</a> <span class='text'>Id of the script to edit.</span></dd> <dt>scriptSource</dt> <dd>String <span class='text'>New content of the script.</span></dd> <dt>preview (optional)</dt> <dd>Boolean <span class='text'> If true the change will not actually be applied. Preview mode may be used to get result description without actually modifying the code.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>callFrames (optional)</dt> <dd>[<a href='#Debugger.CallFrame'>Debugger.CallFrame</a>] <span class='text'>New stack trace in case editing has happened while VM was stopped.</span></dd> <dt>result (optional)</dt> <dd>Object <span class='text'>VM-specific description of the changes applied.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Debugger.setScriptSource Debugger.setScriptSource(scriptId, scriptSource, preview, function callback(res) { // res = {callFrames, result} }); </pre> </div> <div id='Debugger_restartFrame' class='command'> <h3>Debugger.restartFrame <span class='label label-success'>Command</span></h3> <p>Restarts particular call frame from the beginning.</p> <dl> <dt>callFrameId</dt> <dd><a href='#Debugger.CallFrameId'>Debugger.CallFrameId</a> <span class='text'>Call frame identifier to evaluate on.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>callFrames</dt> <dd>[<a href='#Debugger.CallFrame'>Debugger.CallFrame</a>] <span class='text'>New stack trace.</span></dd> <dt>result</dt> <dd>Object <span class='text'>VM-specific description.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Debugger.restartFrame Debugger.restartFrame(callFrameId, function callback(res) { // res = {callFrames, result} }); </pre> </div> <div id='Debugger_getScriptSource' class='command'> <h3>Debugger.getScriptSource <span class='label label-success'>Command</span></h3> <p>Returns source for the script with given id.</p> <dl> <dt>scriptId</dt> <dd><a href='#Debugger.ScriptId'>Debugger.ScriptId</a> <span class='text'>Id of the script to get source for.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>scriptSource</dt> <dd>String <span class='text'>Script source.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Debugger.getScriptSource Debugger.getScriptSource(scriptId, function callback(res) { // res = {scriptSource} }); </pre> </div> <div id='Debugger_getFunctionDetails' class='command'> <h3>Debugger.getFunctionDetails <span class='label label-success'>Command</span></h3> <p>Returns detailed informtation on given function.</p> <dl> <dt>functionId</dt> <dd><a href='#Runtime.RemoteObjectId'>Runtime.RemoteObjectId</a> <span class='text'>Id of the function to get location for.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>details</dt> <dd><a href='#Debugger.FunctionDetails'>Debugger.FunctionDetails</a> <span class='text'>Information about the function.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Debugger.getFunctionDetails Debugger.getFunctionDetails(functionId, function callback(res) { // res = {details} }); </pre> </div> <div id='Debugger_setPauseOnExceptions' class='command'> <h3>Debugger.setPauseOnExceptions <span class='label label-success'>Command</span></h3> <p>Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is <code>none</code>.</p> <dl> <dt>state</dt> <dd>( none | uncaught | all ) <span class='text'>Pause on exceptions mode.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Debugger.setPauseOnExceptions Debugger.setPauseOnExceptions(state); </pre> </div> <div id='Debugger_evaluateOnCallFrame' class='command'> <h3>Debugger.evaluateOnCallFrame <span class='label label-success'>Command</span></h3> <p>Evaluates expression on a given call frame.</p> <dl> <dt>callFrameId</dt> <dd><a href='#Debugger.CallFrameId'>Debugger.CallFrameId</a> <span class='text'>Call frame identifier to evaluate on.</span></dd> <dt>expression</dt> <dd>String <span class='text'>Expression to evaluate.</span></dd> <dt>objectGroup (optional)</dt> <dd>String <span class='text'>String object group name to put result into (allows rapid releasing resulting object handles using <code>releaseObjectGroup</code>).</span></dd> <dt>includeCommandLineAPI (optional)</dt> <dd>Boolean <span class='text'>Specifies whether command line API should be available to the evaluated expression, defaults to false.</span></dd> <dt>doNotPauseOnExceptionsAndMuteConsole (optional)</dt> <dd>Boolean <span class='text'>Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state.</span></dd> <dt>returnByValue (optional)</dt> <dd>Boolean <span class='text'>Whether the result is expected to be a JSON object that should be sent by value.</span></dd> <dt>generatePreview (optional)</dt> <dd>Boolean <span class='text'>Whether preview should be generated for the result.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>result</dt> <dd><a href='#Runtime.RemoteObject'>Runtime.RemoteObject</a> <span class='text'>Object wrapper for the evaluation result.</span></dd> <dt>wasThrown (optional)</dt> <dd>Boolean <span class='text'>True if the result was thrown during the evaluation.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Debugger.evaluateOnCallFrame Debugger.evaluateOnCallFrame(callFrameId, expression, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, function callback(res) { // res = {result, wasThrown} }); </pre> </div> <div id='Debugger_compileScript' class='command'> <h3>Debugger.compileScript <span class='label label-success'>Command</span></h3> <p>Compiles expression.</p> <dl> <dt>expression</dt> <dd>String <span class='text'>Expression to compile.</span></dd> <dt>sourceURL</dt> <dd>String <span class='text'>Source url to be set for the script.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>scriptId (optional)</dt> <dd><a href='#Debugger.ScriptId'>Debugger.ScriptId</a> <span class='text'>Id of the script.</span></dd> <dt>syntaxErrorMessage (optional)</dt> <dd>String <span class='text'>Syntax error message if compilation failed.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Debugger.compileScript Debugger.compileScript(expression, sourceURL, function callback(res) { // res = {scriptId, syntaxErrorMessage} }); </pre> </div> <div id='Debugger_runScript' class='command'> <h3>Debugger.runScript <span class='label label-success'>Command</span></h3> <p>Runs script with given id in a given context.</p> <dl> <dt>scriptId</dt> <dd><a href='#Debugger.ScriptId'>Debugger.ScriptId</a> <span class='text'>Id of the script to run.</span></dd> <dt>contextId (optional)</dt> <dd><a href='#Runtime.ExecutionContextId'>Runtime.ExecutionContextId</a> <span class='text'>Specifies in which isolated context to perform script run. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page.</span></dd> <dt>objectGroup (optional)</dt> <dd>String <span class='text'>Symbolic group name that can be used to release multiple objects.</span></dd> <dt>doNotPauseOnExceptionsAndMuteConsole (optional)</dt> <dd>Boolean <span class='text'>Specifies whether script run should stop on exceptions and mute console. Overrides setPauseOnException state.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>result</dt> <dd><a href='#Runtime.RemoteObject'>Runtime.RemoteObject</a> <span class='text'>Run result.</span></dd> <dt>wasThrown (optional)</dt> <dd>Boolean <span class='text'>True if the result was thrown during the script run.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Debugger.runScript Debugger.runScript(scriptId, contextId, objectGroup, doNotPauseOnExceptionsAndMuteConsole, function callback(res) { // res = {result, wasThrown} }); </pre> </div> <div id='Debugger_setOverlayMessage' class='command'> <h3>Debugger.setOverlayMessage <span class='label label-success'>Command</span></h3> <p>Sets overlay message.</p> <dl> <dt>message (optional)</dt> <dd>String <span class='text'>Overlay message to display when paused in debugger.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Debugger.setOverlayMessage Debugger.setOverlayMessage(message); </pre> </div> <div id='Debugger_setVariableValue' class='command'> <h3>Debugger.setVariableValue <span class='label label-success'>Command</span></h3> <p>Changes value of variable in a callframe or a closure. Either callframe or function must be specified. Object-based scopes are not supported and must be mutated manually.</p> <dl> <dt>scopeNumber</dt> <dd>Integer <span class='text'>0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually.</span></dd> <dt>variableName</dt> <dd>String <span class='text'>Variable name.</span></dd> <dt>newValue</dt> <dd><a href='#Runtime.CallArgument'>Runtime.CallArgument</a> <span class='text'>New variable value.</span></dd> <dt>callFrameId (optional)</dt> <dd><a href='#Debugger.CallFrameId'>Debugger.CallFrameId</a> <span class='text'>Id of callframe that holds variable.</span></dd> <dt>functionObjectId (optional)</dt> <dd><a href='#Runtime.RemoteObjectId'>Runtime.RemoteObjectId</a> <span class='text'>Object id of closure (function) that holds variable.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Debugger.setVariableValue Debugger.setVariableValue(scopeNumber, variableName, newValue, callFrameId, functionObjectId); </pre> </div> <div id='Debugger_getStepInPositions' class='command'> <h3>Debugger.getStepInPositions <span class='label label-success'>Command</span></h3> <p>Lists all positions where step-in is possible for a current statement in a specified call frame</p> <dl> <dt>callFrameId</dt> <dd><a href='#Debugger.CallFrameId'>Debugger.CallFrameId</a> <span class='text'>Id of a call frame where the current statement should be analized</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>stepInPositions (optional)</dt> <dd>[<a href='#Debugger.Location'>Debugger.Location</a>] <span class='text'>experimental</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Debugger.getStepInPositions Debugger.getStepInPositions(callFrameId, function callback(res) { // res = {stepInPositions} }); </pre> </div> <div id='Debugger_getBacktrace' class='command'> <h3>Debugger.getBacktrace <span class='label label-success'>Command</span></h3> <p>Returns call stack including variables changed since VM was paused. VM must be paused.</p> <h4>Callback Parameters:</h4> <dl> <dt>callFrames</dt> <dd>[<a href='#Debugger.CallFrame'>Debugger.CallFrame</a>] <span class='text'>Call stack the virtual machine stopped on.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Debugger.getBacktrace Debugger.getBacktrace(function callback(res) { // res = {callFrames} }); </pre> </div> <div id='Debugger_skipStackFrames' class='command'> <h3>Debugger.skipStackFrames <span class='label label-success'>Command</span></h3> <p>Makes backend skip steps in the sources with names matching given pattern. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.</p> <dl> <dt>script (optional)</dt> <dd>String <span class='text'>Regular expression defining the scripts to ignore while stepping.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Debugger.skipStackFrames Debugger.skipStackFrames(script); </pre> </div> <div id='Debugger_globalObjectCleared' class='command'> <h3>Debugger.globalObjectCleared <span class='label label-info'>Event</span></h3> <p>Called when global has been cleared and debugger client should reset its state. Happens upon navigation or reload.</p> <h4>Code Example:</h4> <pre> // WebInspector Event: Debugger.globalObjectCleared function onGlobalObjectCleared(res) { // res = {} } </pre> </div> <div id='Debugger_scriptParsed' class='command'> <h3>Debugger.scriptParsed <span class='label label-info'>Event</span></h3> <p>Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.</p> <dl> <dt>scriptId</dt> <dd><a href='#Debugger.ScriptId'>Debugger.ScriptId</a> <span class='text'>Identifier of the script parsed.</span></dd> <dt>url</dt> <dd>String <span class='text'>URL or name of the script parsed (if any).</span></dd> <dt>startLine</dt> <dd>Integer <span class='text'>Line offset of the script within the resource with given URL (for script tags).</span></dd> <dt>startColumn</dt> <dd>Integer <span class='text'>Column offset of the script within the resource with given URL.</span></dd> <dt>endLine</dt> <dd>Integer <span class='text'>Last line of the script.</span></dd> <dt>endColumn</dt> <dd>Integer <span class='text'>Length of the last line of the script.</span></dd> <dt>isContentScript (optional)</dt> <dd>Boolean <span class='text'>Determines whether this script is a user extension script.</span></dd> <dt>sourceMapURL (optional)</dt> <dd>String <span class='text'>URL of source map associated with script (if any).</span></dd> <dt>hasSourceURL (optional)</dt> <dd>Boolean <span class='text'>True, if this script has sourceURL.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Debugger.scriptParsed function onScriptParsed(res) { // res = {scriptId, url, startLine, startColumn, endLine, endColumn, isContentScript, sourceMapURL, hasSourceURL} } </pre> </div> <div id='Debugger_scriptFailedToParse' class='command'> <h3>Debugger.scriptFailedToParse <span class='label label-info'>Event</span></h3> <p>Fired when virtual machine fails to parse the script.</p> <dl> <dt>url</dt> <dd>String <span class='text'>URL of the script that failed to parse.</span></dd> <dt>scriptSource</dt> <dd>String <span class='text'>Source text of the script that failed to parse.</span></dd> <dt>startLine</dt> <dd>Integer <span class='text'>Line offset of the script within the resource.</span></dd> <dt>errorLine</dt> <dd>Integer <span class='text'>Line with error.</span></dd> <dt>errorMessage</dt> <dd>String <span class='text'>Parse error message.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Debugger.scriptFailedToParse function onScriptFailedToParse(res) { // res = {url, scriptSource, startLine, errorLine, errorMessage} } </pre> </div> <div id='Debugger_breakpointResolved' class='command'> <h3>Debugger.breakpointResolved <span class='label label-info'>Event</span></h3> <p>Fired when breakpoint is resolved to an actual script and location.</p> <dl> <dt>breakpointId</dt> <dd><a href='#Debugger.BreakpointId'>Debugger.BreakpointId</a> <span class='text'>Breakpoint unique identifier.</span></dd> <dt>location</dt> <dd><a href='#Debugger.Location'>Debugger.Location</a> <span class='text'>Actual breakpoint location.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Debugger.breakpointResolved function onBreakpointResolved(res) { // res = {breakpointId, location} } </pre> </div> <div id='Debugger_paused' class='command'> <h3>Debugger.paused <span class='label label-info'>Event</span></h3> <p>Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.</p> <dl> <dt>callFrames</dt> <dd>[<a href='#Debugger.CallFrame'>Debugger.CallFrame</a>] <span class='text'>Call stack the virtual machine stopped on.</span></dd> <dt>reason</dt> <dd>( XHR | DOM | EventListener | exception | assert | CSPViolation | debugCommand | other ) <span class='text'>Pause reason.</span></dd> <dt>data (optional)</dt> <dd>Object <span class='text'>Object containing break-specific auxiliary properties.</span></dd> <dt>hitBreakpoints (optional)</dt> <dd>[String] <span class='text'>Hit breakpoints IDs</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Debugger.paused function onPaused(res) { // res = {callFrames, reason, data, hitBreakpoints} } </pre> </div> <div id='Debugger_resumed' class='command'> <h3>Debugger.resumed <span class='label label-info'>Event</span></h3> <p>Fired when the virtual machine resumed execution.</p> <h4>Code Example:</h4> <pre> // WebInspector Event: Debugger.resumed function onResumed(res) { // res = {} } </pre> </div> </section> <section id='FileSystem' class='domain'> <h1>FileSystem</h1> <p></p> <span class='label'>Type</span> <ul> <li><a href='#FileSystem.Entry'>FileSystem.Entry</a>: Represents a browser side file or directory.</li> <li><a href='#FileSystem.Metadata'>FileSystem.Metadata</a>: Represents metadata of a file or entry.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#FileSystem.enable'>FileSystem.enable</a>: Enables events from backend.</li> <li><a href='#FileSystem.disable'>FileSystem.disable</a>: Disables events from backend.</li> <li><a href='#FileSystem.requestFileSystemRoot'>FileSystem.requestFileSystemRoot</a>: Returns root directory of the FileSystem, if exists.</li> <li><a href='#FileSystem.requestDirectoryContent'>FileSystem.requestDirectoryContent</a>: Returns content of the directory.</li> <li><a href='#FileSystem.requestMetadata'>FileSystem.requestMetadata</a>: Returns metadata of the entry.</li> <li><a href='#FileSystem.requestFileContent'>FileSystem.requestFileContent</a>: Returns content of the file. Result should be sliced into [start, end).</li> <li><a href='#FileSystem.deleteEntry'>FileSystem.deleteEntry</a>: Deletes specified entry. If the entry is a directory, the agent deletes children recursively.</li> </ul> <div id='FileSystem_Entry' class='type'> <h3>FileSystem.Entry <span class='label'>Type</span></h3> <p>Represents a browser side file or directory.</p> <dl> <dt>url</dt> <dd>String <span class='text'>filesystem: URL for the entry.</span></dd> <dt>name</dt> <dd>String <span class='text'>The name of the file or directory.</span></dd> <dt>isDirectory</dt> <dd>Boolean <span class='text'>True if the entry is a directory.</span></dd> <dt>mimeType (optional)</dt> <dd>String <span class='text'>MIME type of the entry, available for a file only.</span></dd> <dt>resourceType (optional)</dt> <dd><a href='#Page.ResourceType'>Page.ResourceType</a> <span class='text'>ResourceType of the entry, available for a file only.</span></dd> <dt>isTextFile (optional)</dt> <dd>Boolean <span class='text'>True if the entry is a text file.</span></dd> </dl> </div> <div id='FileSystem_Metadata' class='type'> <h3>FileSystem.Metadata <span class='label'>Type</span></h3> <p>Represents metadata of a file or entry.</p> <dl> <dt>modificationTime</dt> <dd>Number <span class='text'>Modification time.</span></dd> <dt>size</dt> <dd>Number <span class='text'>File size. This field is always zero for directories.</span></dd> </dl> </div> <div id='FileSystem_enable' class='command'> <h3>FileSystem.enable <span class='label label-success'>Command</span></h3> <p>Enables events from backend.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: FileSystem.enable FileSystem.enable(); </pre> </div> <div id='FileSystem_disable' class='command'> <h3>FileSystem.disable <span class='label label-success'>Command</span></h3> <p>Disables events from backend.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: FileSystem.disable FileSystem.disable(); </pre> </div> <div id='FileSystem_requestFileSystemRoot' class='command'> <h3>FileSystem.requestFileSystemRoot <span class='label label-success'>Command</span></h3> <p>Returns root directory of the FileSystem, if exists.</p> <dl> <dt>origin</dt> <dd>String <span class='text'>Security origin of requesting FileSystem. One of frames in current page needs to have this security origin.</span></dd> <dt>type</dt> <dd>( temporary | persistent ) <span class='text'>FileSystem type of requesting FileSystem.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>errorCode</dt> <dd>Integer <span class='text'>0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value.</span></dd> <dt>root (optional)</dt> <dd><a href='#FileSystem.Entry'>FileSystem.Entry</a> <span class='text'>Contains root of the requested FileSystem if the command completed successfully.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: FileSystem.requestFileSystemRoot FileSystem.requestFileSystemRoot(origin, type, function callback(res) { // res = {errorCode, root} }); </pre> </div> <div id='FileSystem_requestDirectoryContent' class='command'> <h3>FileSystem.requestDirectoryContent <span class='label label-success'>Command</span></h3> <p>Returns content of the directory.</p> <dl> <dt>url</dt> <dd>String <span class='text'>URL of the directory that the frontend is requesting to read from.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>errorCode</dt> <dd>Integer <span class='text'>0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value.</span></dd> <dt>entries (optional)</dt> <dd>[<a href='#FileSystem.Entry'>FileSystem.Entry</a>] <span class='text'>Contains all entries on directory if the command completed successfully.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: FileSystem.requestDirectoryContent FileSystem.requestDirectoryContent(url, function callback(res) { // res = {errorCode, entries} }); </pre> </div> <div id='FileSystem_requestMetadata' class='command'> <h3>FileSystem.requestMetadata <span class='label label-success'>Command</span></h3> <p>Returns metadata of the entry.</p> <dl> <dt>url</dt> <dd>String <span class='text'>URL of the entry that the frontend is requesting to get metadata from.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>errorCode</dt> <dd>Integer <span class='text'>0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value.</span></dd> <dt>metadata (optional)</dt> <dd><a href='#FileSystem.Metadata'>FileSystem.Metadata</a> <span class='text'>Contains metadata of the entry if the command completed successfully.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: FileSystem.requestMetadata FileSystem.requestMetadata(url, function callback(res) { // res = {errorCode, metadata} }); </pre> </div> <div id='FileSystem_requestFileContent' class='command'> <h3>FileSystem.requestFileContent <span class='label label-success'>Command</span></h3> <p>Returns content of the file. Result should be sliced into [start, end).</p> <dl> <dt>url</dt> <dd>String <span class='text'>URL of the file that the frontend is requesting to read from.</span></dd> <dt>readAsText</dt> <dd>Boolean <span class='text'>True if the content should be read as text, otherwise the result will be returned as base64 encoded text.</span></dd> <dt>start (optional)</dt> <dd>Integer <span class='text'>Specifies the start of range to read.</span></dd> <dt>end (optional)</dt> <dd>Integer <span class='text'>Specifies the end of range to read exclusively.</span></dd> <dt>charset (optional)</dt> <dd>String <span class='text'>Overrides charset of the content when content is served as text.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>errorCode</dt> <dd>Integer <span class='text'>0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value.</span></dd> <dt>content (optional)</dt> <dd>String <span class='text'>Content of the file.</span></dd> <dt>charset (optional)</dt> <dd>String <span class='text'>Charset of the content if it is served as text.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: FileSystem.requestFileContent FileSystem.requestFileContent(url, readAsText, start, end, charset, function callback(res) { // res = {errorCode, content, charset} }); </pre> </div> <div id='FileSystem_deleteEntry' class='command'> <h3>FileSystem.deleteEntry <span class='label label-success'>Command</span></h3> <p>Deletes specified entry. If the entry is a directory, the agent deletes children recursively.</p> <dl> <dt>url</dt> <dd>String <span class='text'>URL of the entry to delete.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>errorCode</dt> <dd>Integer <span class='text'>0, if no error. Otherwise errorCode is set to FileError::ErrorCode value.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: FileSystem.deleteEntry FileSystem.deleteEntry(url, function callback(res) { // res = {errorCode} }); </pre> </div> </section> <section id='HeapProfiler' class='domain'> <h1>HeapProfiler</h1> <p></p> <span class='label'>Type</span> <ul> <li><a href='#HeapProfiler.ProfileHeader'>HeapProfiler.ProfileHeader</a>: Profile header.</li> <li><a href='#HeapProfiler.HeapSnapshotObjectId'>HeapProfiler.HeapSnapshotObjectId</a>: Heap snashot object id.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#HeapProfiler.getProfileHeaders'>HeapProfiler.getProfileHeaders</a></li> <li><a href='#HeapProfiler.startTrackingHeapObjects'>HeapProfiler.startTrackingHeapObjects</a></li> <li><a href='#HeapProfiler.stopTrackingHeapObjects'>HeapProfiler.stopTrackingHeapObjects</a></li> <li><a href='#HeapProfiler.getHeapSnapshot'>HeapProfiler.getHeapSnapshot</a></li> <li><a href='#HeapProfiler.removeProfile'>HeapProfiler.removeProfile</a></li> <li><a href='#HeapProfiler.clearProfiles'>HeapProfiler.clearProfiles</a></li> <li><a href='#HeapProfiler.takeHeapSnapshot'>HeapProfiler.takeHeapSnapshot</a></li> <li><a href='#HeapProfiler.collectGarbage'>HeapProfiler.collectGarbage</a></li> <li><a href='#HeapProfiler.getObjectByHeapObjectId'>HeapProfiler.getObjectByHeapObjectId</a></li> <li><a href='#HeapProfiler.getHeapObjectId'>HeapProfiler.getHeapObjectId</a></li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#HeapProfiler.addProfileHeader'>HeapProfiler.addProfileHeader</a></li> <li><a href='#HeapProfiler.addHeapSnapshotChunk'>HeapProfiler.addHeapSnapshotChunk</a></li> <li><a href='#HeapProfiler.finishHeapSnapshot'>HeapProfiler.finishHeapSnapshot</a></li> <li><a href='#HeapProfiler.resetProfiles'>HeapProfiler.resetProfiles</a></li> <li><a href='#HeapProfiler.reportHeapSnapshotProgress'>HeapProfiler.reportHeapSnapshotProgress</a></li> <li><a href='#HeapProfiler.lastSeenObjectId'>HeapProfiler.lastSeenObjectId</a>: If heap objects tracking has been started then backend regulary sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.</li> <li><a href='#HeapProfiler.heapStatsUpdate'>HeapProfiler.heapStatsUpdate</a>: If heap objects tracking has been started then backend may send update for one or more fragments</li> </ul> <div id='HeapProfiler_ProfileHeader' class='type'> <h3>HeapProfiler.ProfileHeader <span class='label'>Type</span></h3> <p>Profile header.</p> <dl> <dt>title</dt> <dd>String <span class='text'>Profile title.</span></dd> <dt>uid</dt> <dd>Integer <span class='text'>Unique identifier of the profile.</span></dd> <dt>maxJSObjectId (optional)</dt> <dd>Integer <span class='text'>Last seen JS object Id.</span></dd> </dl> </div> <div id='HeapProfiler_HeapSnapshotObjectId' class='type'> <h3>HeapProfiler.HeapSnapshotObjectId <span class='label'>Type</span></h3> <p>Heap snashot object id.</p> <dl> <dd>String</dd> </dl> </div> <div id='HeapProfiler_getProfileHeaders' class='command'> <h3>HeapProfiler.getProfileHeaders <span class='label label-success'>Command</span></h3> <h4>Callback Parameters:</h4> <dl> <dt>headers</dt> <dd>[<a href='#HeapProfiler.ProfileHeader'>HeapProfiler.ProfileHeader</a>]</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: HeapProfiler.getProfileHeaders HeapProfiler.getProfileHeaders(function callback(res) { // res = {headers} }); </pre> </div> <div id='HeapProfiler_startTrackingHeapObjects' class='command'> <h3>HeapProfiler.startTrackingHeapObjects <span class='label label-success'>Command</span></h3> <h4>Code Example:</h4> <pre> // WebInspector Command: HeapProfiler.startTrackingHeapObjects HeapProfiler.startTrackingHeapObjects(); </pre> </div> <div id='HeapProfiler_stopTrackingHeapObjects' class='command'> <h3>HeapProfiler.stopTrackingHeapObjects <span class='label label-success'>Command</span></h3> <h4>Code Example:</h4> <pre> // WebInspector Command: HeapProfiler.stopTrackingHeapObjects HeapProfiler.stopTrackingHeapObjects(); </pre> </div> <div id='HeapProfiler_getHeapSnapshot' class='command'> <h3>HeapProfiler.getHeapSnapshot <span class='label label-success'>Command</span></h3> <dl> <dt>uid</dt> <dd>Integer</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: HeapProfiler.getHeapSnapshot HeapProfiler.getHeapSnapshot(uid); </pre> </div> <div id='HeapProfiler_removeProfile' class='command'> <h3>HeapProfiler.removeProfile <span class='label label-success'>Command</span></h3> <dl> <dt>uid</dt> <dd>Integer</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: HeapProfiler.removeProfile HeapProfiler.removeProfile(uid); </pre> </div> <div id='HeapProfiler_clearProfiles' class='command'> <h3>HeapProfiler.clearProfiles <span class='label label-success'>Command</span></h3> <h4>Code Example:</h4> <pre> // WebInspector Command: HeapProfiler.clearProfiles HeapProfiler.clearProfiles(); </pre> </div> <div id='HeapProfiler_takeHeapSnapshot' class='command'> <h3>HeapProfiler.takeHeapSnapshot <span class='label label-success'>Command</span></h3> <dl> <dt>reportProgress (optional)</dt> <dd>Boolean <span class='text'>If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: HeapProfiler.takeHeapSnapshot HeapProfiler.takeHeapSnapshot(reportProgress); </pre> </div> <div id='HeapProfiler_collectGarbage' class='command'> <h3>HeapProfiler.collectGarbage <span class='label label-success'>Command</span></h3> <h4>Code Example:</h4> <pre> // WebInspector Command: HeapProfiler.collectGarbage HeapProfiler.collectGarbage(); </pre> </div> <div id='HeapProfiler_getObjectByHeapObjectId' class='command'> <h3>HeapProfiler.getObjectByHeapObjectId <span class='label label-success'>Command</span></h3> <dl> <dt>objectId</dt> <dd><a href='#HeapProfiler.HeapSnapshotObjectId'>HeapProfiler.HeapSnapshotObjectId</a></dd> <dt>objectGroup (optional)</dt> <dd>String <span class='text'>Symbolic group name that can be used to release multiple objects.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>result</dt> <dd><a href='#Runtime.RemoteObject'>Runtime.RemoteObject</a> <span class='text'>Evaluation result.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: HeapProfiler.getObjectByHeapObjectId HeapProfiler.getObjectByHeapObjectId(objectId, objectGroup, function callback(res) { // res = {result} }); </pre> </div> <div id='HeapProfiler_getHeapObjectId' class='command'> <h3>HeapProfiler.getHeapObjectId <span class='label label-success'>Command</span></h3> <dl> <dt>objectId</dt> <dd><a href='#Runtime.RemoteObjectId'>Runtime.RemoteObjectId</a> <span class='text'>Identifier of the object to get heap object id for.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>heapSnapshotObjectId</dt> <dd><a href='#HeapProfiler.HeapSnapshotObjectId'>HeapProfiler.HeapSnapshotObjectId</a> <span class='text'>Id of the heap snapshot object corresponding to the passed remote object id.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: HeapProfiler.getHeapObjectId HeapProfiler.getHeapObjectId(objectId, function callback(res) { // res = {heapSnapshotObjectId} }); </pre> </div> <div id='HeapProfiler_addProfileHeader' class='command'> <h3>HeapProfiler.addProfileHeader <span class='label label-info'>Event</span></h3> <dl> <dt>header</dt> <dd><a href='#HeapProfiler.ProfileHeader'>HeapProfiler.ProfileHeader</a></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: HeapProfiler.addProfileHeader function onAddProfileHeader(res) { // res = {header} } </pre> </div> <div id='HeapProfiler_addHeapSnapshotChunk' class='command'> <h3>HeapProfiler.addHeapSnapshotChunk <span class='label label-info'>Event</span></h3> <dl> <dt>uid</dt> <dd>Integer</dd> <dt>chunk</dt> <dd>String</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: HeapProfiler.addHeapSnapshotChunk function onAddHeapSnapshotChunk(res) { // res = {uid, chunk} } </pre> </div> <div id='HeapProfiler_finishHeapSnapshot' class='command'> <h3>HeapProfiler.finishHeapSnapshot <span class='label label-info'>Event</span></h3> <dl> <dt>uid</dt> <dd>Integer</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: HeapProfiler.finishHeapSnapshot function onFinishHeapSnapshot(res) { // res = {uid} } </pre> </div> <div id='HeapProfiler_resetProfiles' class='command'> <h3>HeapProfiler.resetProfiles <span class='label label-info'>Event</span></h3> <h4>Code Example:</h4> <pre> // WebInspector Event: HeapProfiler.resetProfiles function onResetProfiles(res) { // res = {} } </pre> </div> <div id='HeapProfiler_reportHeapSnapshotProgress' class='command'> <h3>HeapProfiler.reportHeapSnapshotProgress <span class='label label-info'>Event</span></h3> <dl> <dt>done</dt> <dd>Integer</dd> <dt>total</dt> <dd>Integer</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: HeapProfiler.reportHeapSnapshotProgress function onReportHeapSnapshotProgress(res) { // res = {done, total} } </pre> </div> <div id='HeapProfiler_lastSeenObjectId' class='command'> <h3>HeapProfiler.lastSeenObjectId <span class='label label-info'>Event</span></h3> <p>If heap objects tracking has been started then backend regulary sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.</p> <dl> <dt>lastSeenObjectId</dt> <dd>Integer</dd> <dt>timestamp</dt> <dd>Number</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: HeapProfiler.lastSeenObjectId function onLastSeenObjectId(res) { // res = {lastSeenObjectId, timestamp} } </pre> </div> <div id='HeapProfiler_heapStatsUpdate' class='command'> <h3>HeapProfiler.heapStatsUpdate <span class='label label-info'>Event</span></h3> <p>If heap objects tracking has been started then backend may send update for one or more fragments</p> <dl> <dt>statsUpdate</dt> <dd>[Integer] <span class='text'>An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: HeapProfiler.heapStatsUpdate function onHeapStatsUpdate(res) { // res = {statsUpdate} } </pre> </div> </section> <section id='IndexedDB' class='domain'> <h1>IndexedDB</h1> <p></p> <span class='label'>Type</span> <ul> <li><a href='#IndexedDB.DatabaseWithObjectStores'>IndexedDB.DatabaseWithObjectStores</a>: Database with an array of object stores.</li> <li><a href='#IndexedDB.ObjectStore'>IndexedDB.ObjectStore</a>: Object store.</li> <li><a href='#IndexedDB.ObjectStoreIndex'>IndexedDB.ObjectStoreIndex</a>: Object store index.</li> <li><a href='#IndexedDB.Key'>IndexedDB.Key</a>: Key.</li> <li><a href='#IndexedDB.KeyRange'>IndexedDB.KeyRange</a>: Key range.</li> <li><a href='#IndexedDB.DataEntry'>IndexedDB.DataEntry</a>: Data entry.</li> <li><a href='#IndexedDB.KeyPath'>IndexedDB.KeyPath</a>: Key path.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#IndexedDB.enable'>IndexedDB.enable</a>: Enables events from backend.</li> <li><a href='#IndexedDB.disable'>IndexedDB.disable</a>: Disables events from backend.</li> <li><a href='#IndexedDB.requestDatabaseNames'>IndexedDB.requestDatabaseNames</a>: Requests database names for given security origin.</li> <li><a href='#IndexedDB.requestDatabase'>IndexedDB.requestDatabase</a>: Requests database with given name in given frame.</li> <li><a href='#IndexedDB.requestData'>IndexedDB.requestData</a>: Requests data from object store or index.</li> <li><a href='#IndexedDB.clearObjectStore'>IndexedDB.clearObjectStore</a>: Clears all entries from an object store.</li> </ul> <div id='IndexedDB_DatabaseWithObjectStores' class='type'> <h3>IndexedDB.DatabaseWithObjectStores <span class='label'>Type</span></h3> <p>Database with an array of object stores.</p> <dl> <dt>name</dt> <dd>String <span class='text'>Database name.</span></dd> <dt>version</dt> <dd>String <span class='text'>Deprecated string database version.</span></dd> <dt>intVersion</dt> <dd>Integer <span class='text'>Integer database version.</span></dd> <dt>objectStores</dt> <dd>[<a href='#IndexedDB.ObjectStore'>IndexedDB.ObjectStore</a>] <span class='text'>Object stores in this database.</span></dd> </dl> </div> <div id='IndexedDB_ObjectStore' class='type'> <h3>IndexedDB.ObjectStore <span class='label'>Type</span></h3> <p>Object store.</p> <dl> <dt>name</dt> <dd>String <span class='text'>Object store name.</span></dd> <dt>keyPath</dt> <dd><a href='#IndexedDB.KeyPath'>IndexedDB.KeyPath</a> <span class='text'>Object store key path.</span></dd> <dt>autoIncrement</dt> <dd>Boolean <span class='text'>If true, object store has auto increment flag set.</span></dd> <dt>indexes</dt> <dd>[<a href='#IndexedDB.ObjectStoreIndex'>IndexedDB.ObjectStoreIndex</a>] <span class='text'>Indexes in this object store.</span></dd> </dl> </div> <div id='IndexedDB_ObjectStoreIndex' class='type'> <h3>IndexedDB.ObjectStoreIndex <span class='label'>Type</span></h3> <p>Object store index.</p> <dl> <dt>name</dt> <dd>String <span class='text'>Index name.</span></dd> <dt>keyPath</dt> <dd><a href='#IndexedDB.KeyPath'>IndexedDB.KeyPath</a> <span class='text'>Index key path.</span></dd> <dt>unique</dt> <dd>Boolean <span class='text'>If true, index is unique.</span></dd> <dt>multiEntry</dt> <dd>Boolean <span class='text'>If true, index allows multiple entries for a key.</span></dd> </dl> </div> <div id='IndexedDB_Key' class='type'> <h3>IndexedDB.Key <span class='label'>Type</span></h3> <p>Key.</p> <dl> <dt>type</dt> <dd>( number | string | date | array ) <span class='text'>Key type.</span></dd> <dt>number (optional)</dt> <dd>Number <span class='text'>Number value.</span></dd> <dt>string (optional)</dt> <dd>String <span class='text'>String value.</span></dd> <dt>date (optional)</dt> <dd>Number <span class='text'>Date value.</span></dd> <dt>array (optional)</dt> <dd>[<a href='#IndexedDB.Key'>IndexedDB.Key</a>] <span class='text'>Array value.</span></dd> </dl> </div> <div id='IndexedDB_KeyRange' class='type'> <h3>IndexedDB.KeyRange <span class='label'>Type</span></h3> <p>Key range.</p> <dl> <dt>lower (optional)</dt> <dd><a href='#IndexedDB.Key'>IndexedDB.Key</a> <span class='text'>Lower bound.</span></dd> <dt>upper (optional)</dt> <dd><a href='#IndexedDB.Key'>IndexedDB.Key</a> <span class='text'>Upper bound.</span></dd> <dt>lowerOpen</dt> <dd>Boolean <span class='text'>If true lower bound is open.</span></dd> <dt>upperOpen</dt> <dd>Boolean <span class='text'>If true upper bound is open.</span></dd> </dl> </div> <div id='IndexedDB_DataEntry' class='type'> <h3>IndexedDB.DataEntry <span class='label'>Type</span></h3> <p>Data entry.</p> <dl> <dt>key</dt> <dd><a href='#Runtime.RemoteObject'>Runtime.RemoteObject</a> <span class='text'>Key.</span></dd> <dt>primaryKey</dt> <dd><a href='#Runtime.RemoteObject'>Runtime.RemoteObject</a> <span class='text'>Primary key.</span></dd> <dt>value</dt> <dd><a href='#Runtime.RemoteObject'>Runtime.RemoteObject</a> <span class='text'>Value.</span></dd> </dl> </div> <div id='IndexedDB_KeyPath' class='type'> <h3>IndexedDB.KeyPath <span class='label'>Type</span></h3> <p>Key path.</p> <dl> <dt>type</dt> <dd>( null | string | array ) <span class='text'>Key path type.</span></dd> <dt>string (optional)</dt> <dd>String <span class='text'>String value.</span></dd> <dt>array (optional)</dt> <dd>[String] <span class='text'>Array value.</span></dd> </dl> </div> <div id='IndexedDB_enable' class='command'> <h3>IndexedDB.enable <span class='label label-success'>Command</span></h3> <p>Enables events from backend.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: IndexedDB.enable IndexedDB.enable(); </pre> </div> <div id='IndexedDB_disable' class='command'> <h3>IndexedDB.disable <span class='label label-success'>Command</span></h3> <p>Disables events from backend.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: IndexedDB.disable IndexedDB.disable(); </pre> </div> <div id='IndexedDB_requestDatabaseNames' class='command'> <h3>IndexedDB.requestDatabaseNames <span class='label label-success'>Command</span></h3> <p>Requests database names for given security origin.</p> <dl> <dt>securityOrigin</dt> <dd>String <span class='text'>Security origin.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>databaseNames</dt> <dd>[String] <span class='text'>Database names for origin.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: IndexedDB.requestDatabaseNames IndexedDB.requestDatabaseNames(securityOrigin, function callback(res) { // res = {databaseNames} }); </pre> </div> <div id='IndexedDB_requestDatabase' class='command'> <h3>IndexedDB.requestDatabase <span class='label label-success'>Command</span></h3> <p>Requests database with given name in given frame.</p> <dl> <dt>securityOrigin</dt> <dd>String <span class='text'>Security origin.</span></dd> <dt>databaseName</dt> <dd>String <span class='text'>Database name.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>databaseWithObjectStores</dt> <dd><a href='#IndexedDB.DatabaseWithObjectStores'>IndexedDB.DatabaseWithObjectStores</a> <span class='text'>Database with an array of object stores.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: IndexedDB.requestDatabase IndexedDB.requestDatabase(securityOrigin, databaseName, function callback(res) { // res = {databaseWithObjectStores} }); </pre> </div> <div id='IndexedDB_requestData' class='command'> <h3>IndexedDB.requestData <span class='label label-success'>Command</span></h3> <p>Requests data from object store or index.</p> <dl> <dt>securityOrigin</dt> <dd>String <span class='text'>Security origin.</span></dd> <dt>databaseName</dt> <dd>String <span class='text'>Database name.</span></dd> <dt>objectStoreName</dt> <dd>String <span class='text'>Object store name.</span></dd> <dt>indexName</dt> <dd>String <span class='text'>Index name, empty string for object store data requests.</span></dd> <dt>skipCount</dt> <dd>Integer <span class='text'>Number of records to skip.</span></dd> <dt>pageSize</dt> <dd>Integer <span class='text'>Number of records to fetch.</span></dd> <dt>keyRange (optional)</dt> <dd><a href='#IndexedDB.KeyRange'>IndexedDB.KeyRange</a> <span class='text'>Key range.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>objectStoreDataEntries</dt> <dd>[<a href='#IndexedDB.DataEntry'>IndexedDB.DataEntry</a>] <span class='text'>Array of object store data entries.</span></dd> <dt>hasMore</dt> <dd>Boolean <span class='text'>If true, there are more entries to fetch in the given range.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: IndexedDB.requestData IndexedDB.requestData(securityOrigin, databaseName, objectStoreName, indexName, skipCount, pageSize, keyRange, function callback(res) { // res = {objectStoreDataEntries, hasMore} }); </pre> </div> <div id='IndexedDB_clearObjectStore' class='command'> <h3>IndexedDB.clearObjectStore <span class='label label-success'>Command</span></h3> <p>Clears all entries from an object store.</p> <dl> <dt>securityOrigin</dt> <dd>String <span class='text'>Security origin.</span></dd> <dt>databaseName</dt> <dd>String <span class='text'>Database name.</span></dd> <dt>objectStoreName</dt> <dd>String <span class='text'>Object store name.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: IndexedDB.clearObjectStore IndexedDB.clearObjectStore(securityOrigin, databaseName, objectStoreName, function callback(res) { // res = {} }); </pre> </div> </section> <section id='Input' class='domain'> <h1>Input</h1> <p></p> <span class='label'>Type</span> <ul> <li><a href='#Input.TouchPoint'>Input.TouchPoint</a></li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#Input.dispatchKeyEvent'>Input.dispatchKeyEvent</a>: Dispatches a key event to the page.</li> <li><a href='#Input.dispatchMouseEvent'>Input.dispatchMouseEvent</a>: Dispatches a mouse event to the page.</li> <li><a href='#Input.dispatchTouchEvent'>Input.dispatchTouchEvent</a>: Dispatches a touch event to the page.</li> <li><a href='#Input.dispatchGestureEvent'>Input.dispatchGestureEvent</a>: Dispatches a gesture event to the page.</li> </ul> <div id='Input_TouchPoint' class='type'> <h3>Input.TouchPoint <span class='label'>Type</span></h3> <dl> <dt>state</dt> <dd>( touchPressed | touchReleased | touchMoved | touchStationary | touchCancelled ) <span class='text'>State of the touch point.</span></dd> <dt>x</dt> <dd>Integer <span class='text'>X coordinate of the event relative to the main frame's viewport.</span></dd> <dt>y</dt> <dd>Integer <span class='text'>Y coordinate of the event relative to the main frame's viewport. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.</span></dd> <dt>radiusX (optional)</dt> <dd>Integer <span class='text'>X radius of the touch area (default: 1).</span></dd> <dt>radiusY (optional)</dt> <dd>Integer <span class='text'>Y radius of the touch area (default: 1).</span></dd> <dt>rotationAngle (optional)</dt> <dd>Number <span class='text'>Rotation angle (default: 0.0).</span></dd> <dt>force (optional)</dt> <dd>Number <span class='text'>Force (default: 1.0).</span></dd> <dt>id (optional)</dt> <dd>Number <span class='text'>Identifier used to track touch sources between events, must be unique within an event.</span></dd> </dl> </div> <div id='Input_dispatchKeyEvent' class='command'> <h3>Input.dispatchKeyEvent <span class='label label-success'>Command</span></h3> <p>Dispatches a key event to the page.</p> <dl> <dt>type</dt> <dd>( keyDown | keyUp | rawKeyDown | char ) <span class='text'>Type of the key event.</span></dd> <dt>modifiers (optional)</dt> <dd>Integer <span class='text'>Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).</span></dd> <dt>timestamp (optional)</dt> <dd>Number <span class='text'>Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time).</span></dd> <dt>text (optional)</dt> <dd>String <span class='text'>Text as generated by processing a virtual key code with a keyboard layout. Not needed for for <code>keyUp</code> and <code>rawKeyDown</code> events (default: "")</span></dd> <dt>unmodifiedText (optional)</dt> <dd>String <span class='text'>Text that would have been generated by the keyboard if no modifiers were pressed (except for shift). Useful for shortcut (accelerator) key handling (default: "").</span></dd> <dt>keyIdentifier (optional)</dt> <dd>String <span class='text'>Unique key identifier (e.g., 'U+0041') (default: "").</span></dd> <dt>windowsVirtualKeyCode (optional)</dt> <dd>Integer <span class='text'>Windows virtual key code (default: 0).</span></dd> <dt>nativeVirtualKeyCode (optional)</dt> <dd>Integer <span class='text'>Native virtual key code (default: 0).</span></dd> <dt>macCharCode (optional)</dt> <dd>Integer <span class='text'>Mac character code (default: 0).</span></dd> <dt>autoRepeat (optional)</dt> <dd>Boolean <span class='text'>Whether the event was generated from auto repeat (default: false).</span></dd> <dt>isKeypad (optional)</dt> <dd>Boolean <span class='text'>Whether the event was generated from the keypad (default: false).</span></dd> <dt>isSystemKey (optional)</dt> <dd>Boolean <span class='text'>Whether the event was a system key event (default: false).</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Input.dispatchKeyEvent Input.dispatchKeyEvent(type, modifiers, timestamp, text, unmodifiedText, keyIdentifier, windowsVirtualKeyCode, nativeVirtualKeyCode, macCharCode, autoRepeat, isKeypad, isSystemKey); </pre> </div> <div id='Input_dispatchMouseEvent' class='command'> <h3>Input.dispatchMouseEvent <span class='label label-success'>Command</span></h3> <p>Dispatches a mouse event to the page.</p> <dl> <dt>type</dt> <dd>( mousePressed | mouseReleased | mouseMoved ) <span class='text'>Type of the mouse event.</span></dd> <dt>x</dt> <dd>Integer <span class='text'>X coordinate of the event relative to the main frame's viewport.</span></dd> <dt>y</dt> <dd>Integer <span class='text'>Y coordinate of the event relative to the main frame's viewport. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.</span></dd> <dt>modifiers (optional)</dt> <dd>Integer <span class='text'>Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).</span></dd> <dt>timestamp (optional)</dt> <dd>Number <span class='text'>Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time).</span></dd> <dt>button (optional)</dt> <dd>( none | left | middle | right ) <span class='text'>Mouse button (default: "none").</span></dd> <dt>clickCount (optional)</dt> <dd>Integer <span class='text'>Number of times the mouse button was clicked (default: 0).</span></dd> <dt>deviceSpace (optional)</dt> <dd>Boolean <span class='text'>If true, x and y are given in dip wrt current viewport.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Input.dispatchMouseEvent Input.dispatchMouseEvent(type, x, y, modifiers, timestamp, button, clickCount, deviceSpace); </pre> </div> <div id='Input_dispatchTouchEvent' class='command'> <h3>Input.dispatchTouchEvent <span class='label label-success'>Command</span></h3> <p>Dispatches a touch event to the page.</p> <dl> <dt>type</dt> <dd>( touchStart | touchEnd | touchMove ) <span class='text'>Type of the touch event.</span></dd> <dt>touchPoints</dt> <dd>[<a href='#Input.TouchPoint'>Input.TouchPoint</a>] <span class='text'>Touch points.</span></dd> <dt>modifiers (optional)</dt> <dd>Integer <span class='text'>Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).</span></dd> <dt>timestamp (optional)</dt> <dd>Number <span class='text'>Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time).</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Input.dispatchTouchEvent Input.dispatchTouchEvent(type, touchPoints, modifiers, timestamp); </pre> </div> <div id='Input_dispatchGestureEvent' class='command'> <h3>Input.dispatchGestureEvent <span class='label label-success'>Command</span></h3> <p>Dispatches a gesture event to the page.</p> <dl> <dt>type</dt> <dd>( scrollBegin | scrollEnd | scrollUpdate | tapDown | tap | pinchBegin | pinchEnd | pinchUpdate ) <span class='text'>Type of the gesture event.</span></dd> <dt>x</dt> <dd>Integer <span class='text'>X coordinate relative to the screen's viewport.</span></dd> <dt>y</dt> <dd>Integer <span class='text'>Y coordinate relative to the screen's viewport.</span></dd> <dt>timestamp (optional)</dt> <dd>Number <span class='text'>Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time).</span></dd> <dt>deltaX (optional)</dt> <dd>Integer <span class='text'>Delta X where apllies.</span></dd> <dt>deltaY (optional)</dt> <dd>Integer <span class='text'>Delta Y where apllies.</span></dd> <dt>pinchScale (optional)</dt> <dd>Number <span class='text'>Pinch scale.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Input.dispatchGestureEvent Input.dispatchGestureEvent(type, x, y, timestamp, deltaX, deltaY, pinchScale); </pre> </div> </section> <section id='Inspector' class='domain'> <h1>Inspector</h1> <p></p> <span class='label label-success'>Command</span> <ul> <li><a href='#Inspector.enable'>Inspector.enable</a>: Enables inspector domain notifications.</li> <li><a href='#Inspector.disable'>Inspector.disable</a>: Disables inspector domain notifications.</li> <li><a href='#Inspector.reset'>Inspector.reset</a>: Resets all domains.</li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#Inspector.evaluateForTestInFrontend'>Inspector.evaluateForTestInFrontend</a></li> <li><a href='#Inspector.inspect'>Inspector.inspect</a></li> <li><a href='#Inspector.detached'>Inspector.detached</a>: Fired when remote debugging connection is about to be terminated. Contains detach reason.</li> <li><a href='#Inspector.targetCrashed'>Inspector.targetCrashed</a>: Fired when debugging target has crashed</li> </ul> <div id='Inspector_enable' class='command'> <h3>Inspector.enable <span class='label label-success'>Command</span></h3> <p>Enables inspector domain notifications.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Inspector.enable Inspector.enable(); </pre> </div> <div id='Inspector_disable' class='command'> <h3>Inspector.disable <span class='label label-success'>Command</span></h3> <p>Disables inspector domain notifications.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Inspector.disable Inspector.disable(); </pre> </div> <div id='Inspector_reset' class='command'> <h3>Inspector.reset <span class='label label-success'>Command</span></h3> <p>Resets all domains.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Inspector.reset Inspector.reset(); </pre> </div> <div id='Inspector_evaluateForTestInFrontend' class='command'> <h3>Inspector.evaluateForTestInFrontend <span class='label label-info'>Event</span></h3> <dl> <dt>testCallId</dt> <dd>Integer</dd> <dt>script</dt> <dd>String</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Inspector.evaluateForTestInFrontend function onEvaluateForTestInFrontend(res) { // res = {testCallId, script} } </pre> </div> <div id='Inspector_inspect' class='command'> <h3>Inspector.inspect <span class='label label-info'>Event</span></h3> <dl> <dt>object</dt> <dd><a href='#Runtime.RemoteObject'>Runtime.RemoteObject</a></dd> <dt>hints</dt> <dd>Object</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Inspector.inspect function onInspect(res) { // res = {object, hints} } </pre> </div> <div id='Inspector_detached' class='command'> <h3>Inspector.detached <span class='label label-info'>Event</span></h3> <p>Fired when remote debugging connection is about to be terminated. Contains detach reason.</p> <dl> <dt>reason</dt> <dd>String <span class='text'>The reason why connection has been terminated.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Inspector.detached function onDetached(res) { // res = {reason} } </pre> </div> <div id='Inspector_targetCrashed' class='command'> <h3>Inspector.targetCrashed <span class='label label-info'>Event</span></h3> <p>Fired when debugging target has crashed</p> <h4>Code Example:</h4> <pre> // WebInspector Event: Inspector.targetCrashed function onTargetCrashed(res) { // res = {} } </pre> </div> </section> <section id='LayerTree' class='domain'> <h1>LayerTree</h1> <p></p> <span class='label'>Type</span> <ul> <li><a href='#LayerTree.LayerId'>LayerTree.LayerId</a>: Unique RenderLayer identifier.</li> <li><a href='#LayerTree.Layer'>LayerTree.Layer</a>: Information about a compositing layer.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#LayerTree.enable'>LayerTree.enable</a>: Enables compositing tree inspection.</li> <li><a href='#LayerTree.disable'>LayerTree.disable</a>: Disables compositing tree inspection.</li> <li><a href='#LayerTree.getLayers'>LayerTree.getLayers</a>: Returns the layer tree structure of the current page.</li> <li><a href='#LayerTree.compositingReasons'>LayerTree.compositingReasons</a>: Provides the reasons why the given layer was composited.</li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#LayerTree.layerTreeDidChange'>LayerTree.layerTreeDidChange</a></li> </ul> <div id='LayerTree_LayerId' class='type'> <h3>LayerTree.LayerId <span class='label'>Type</span></h3> <p>Unique RenderLayer identifier.</p> <dl> <dd>String</dd> </dl> </div> <div id='LayerTree_Layer' class='type'> <h3>LayerTree.Layer <span class='label'>Type</span></h3> <p>Information about a compositing layer.</p> <dl> <dt>layerId</dt> <dd><a href='#LayerTree.LayerId'>LayerTree.LayerId</a> <span class='text'>The unique id for this layer.</span></dd> <dt>parentLayerId (optional)</dt> <dd><a href='#LayerTree.LayerId'>LayerTree.LayerId</a> <span class='text'>The id of parent (not present for root).</span></dd> <dt>nodeId (optional)</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>The id for the node associated with this layer.</span></dd> <dt>offsetX</dt> <dd>Number <span class='text'>Offset from parent layer, X coordinate.</span></dd> <dt>offsetY</dt> <dd>Number <span class='text'>Offset from parent layer, X coordinate.</span></dd> <dt>width</dt> <dd>Number <span class='text'>Layer width.</span></dd> <dt>height</dt> <dd>Number <span class='text'>Layer height.</span></dd> <dt>transform (optional)</dt> <dd>[Number] <span class='text'>Transformation matrix for layer, default is identity matrix</span></dd> <dt>anchorX (optional)</dt> <dd>Number <span class='text'>Transform anchor point X, absent if no transform specified</span></dd> <dt>anchorY (optional)</dt> <dd>Number <span class='text'>Transform anchor point Y, absent if no transform specified</span></dd> <dt>anchorZ (optional)</dt> <dd>Number <span class='text'>Transform anchor point Z, absent if no transform specified</span></dd> <dt>paintCount</dt> <dd>Integer <span class='text'>Indicates how many time this layer has painted.</span></dd> <dt>invisible (optional)</dt> <dd>Boolean <span class='text'>Set if layer is not visible.</span></dd> </dl> </div> <div id='LayerTree_enable' class='command'> <h3>LayerTree.enable <span class='label label-success'>Command</span></h3> <p>Enables compositing tree inspection.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: LayerTree.enable LayerTree.enable(); </pre> </div> <div id='LayerTree_disable' class='command'> <h3>LayerTree.disable <span class='label label-success'>Command</span></h3> <p>Disables compositing tree inspection.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: LayerTree.disable LayerTree.disable(); </pre> </div> <div id='LayerTree_getLayers' class='command'> <h3>LayerTree.getLayers <span class='label label-success'>Command</span></h3> <p>Returns the layer tree structure of the current page.</p> <dl> <dt>nodeId (optional)</dt> <dd><a href='#DOM.NodeId'>DOM.NodeId</a> <span class='text'>Root of the subtree for which we want to gather layers (return entire tree if not specified)</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>layers</dt> <dd>[<a href='#LayerTree.Layer'>LayerTree.Layer</a>] <span class='text'>Child layers.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: LayerTree.getLayers LayerTree.getLayers(nodeId, function callback(res) { // res = {layers} }); </pre> </div> <div id='LayerTree_compositingReasons' class='command'> <h3>LayerTree.compositingReasons <span class='label label-success'>Command</span></h3> <p>Provides the reasons why the given layer was composited.</p> <dl> <dt>layerId</dt> <dd><a href='#LayerTree.LayerId'>LayerTree.LayerId</a> <span class='text'>The id of the layer for which we want to get the reasons it was composited.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>compositingReasons</dt> <dd>[String] <span class='text'>A list of strings specifying reasons for the given layer to become composited.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: LayerTree.compositingReasons LayerTree.compositingReasons(layerId, function callback(res) { // res = {compositingReasons} }); </pre> </div> <div id='LayerTree_layerTreeDidChange' class='command'> <h3>LayerTree.layerTreeDidChange <span class='label label-info'>Event</span></h3> <h4>Code Example:</h4> <pre> // WebInspector Event: LayerTree.layerTreeDidChange function onLayerTreeDidChange(res) { // res = {} } </pre> </div> </section> <section id='Memory' class='domain'> <h1>Memory</h1> <p></p> <span class='label'>Type</span> <ul> <li><a href='#Memory.MemoryBlock'>Memory.MemoryBlock</a></li> <li><a href='#Memory.HeapSnapshotChunk'>Memory.HeapSnapshotChunk</a></li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#Memory.getDOMCounters'>Memory.getDOMCounters</a></li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#Memory.addNativeSnapshotChunk'>Memory.addNativeSnapshotChunk</a></li> </ul> <div id='Memory_MemoryBlock' class='type'> <h3>Memory.MemoryBlock <span class='label'>Type</span></h3> <dl> <dt>size (optional)</dt> <dd>Number <span class='text'>Size of the block in bytes if available</span></dd> <dt>name</dt> <dd>String <span class='text'>Unique name used to identify the component that allocated this block</span></dd> <dt>children (optional)</dt> <dd>[<a href='#Memory.MemoryBlock'>Memory.MemoryBlock</a>]</dd> </dl> </div> <div id='Memory_HeapSnapshotChunk' class='type'> <h3>Memory.HeapSnapshotChunk <span class='label'>Type</span></h3> <dl> <dt>strings</dt> <dd>[String] <span class='text'>An array of strings that were found since last update.</span></dd> <dt>nodes</dt> <dd>[Integer] <span class='text'>An array of nodes that were found since last update.</span></dd> <dt>edges</dt> <dd>[Integer] <span class='text'>An array of edges that were found since last update.</span></dd> <dt>baseToRealNodeId</dt> <dd>[Integer] <span class='text'>An array of integers for nodeId remapping. Even nodeId has to be mapped to the following odd nodeId.</span></dd> </dl> </div> <div id='Memory_getDOMCounters' class='command'> <h3>Memory.getDOMCounters <span class='label label-success'>Command</span></h3> <h4>Callback Parameters:</h4> <dl> <dt>documents</dt> <dd>Integer</dd> <dt>nodes</dt> <dd>Integer</dd> <dt>jsEventListeners</dt> <dd>Integer</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Memory.getDOMCounters Memory.getDOMCounters(function callback(res) { // res = {documents, nodes, jsEventListeners} }); </pre> </div> <div id='Memory_addNativeSnapshotChunk' class='command'> <h3>Memory.addNativeSnapshotChunk <span class='label label-info'>Event</span></h3> <dl> <dt>chunk</dt> <dd><a href='#Memory.HeapSnapshotChunk'>Memory.HeapSnapshotChunk</a> <span class='text'>A chunk of the serialized the snapshot.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Memory.addNativeSnapshotChunk function onAddNativeSnapshotChunk(res) { // res = {chunk} } </pre> </div> </section> <section id='Network' class='domain'> <h1>Network</h1> <p>Network domain allows tracking network activities of the page. It exposes information about http, file, data and other requests and responses, their headers, bodies, timing, etc.</p> <span class='label'>Type</span> <ul> <li><a href='#Network.LoaderId'>Network.LoaderId</a>: Unique loader identifier.</li> <li><a href='#Network.RequestId'>Network.RequestId</a>: Unique request identifier.</li> <li><a href='#Network.Timestamp'>Network.Timestamp</a>: Number of seconds since epoch.</li> <li><a href='#Network.Headers'>Network.Headers</a>: Request / response headers as keys / values of JSON object.</li> <li><a href='#Network.ResourceTiming'>Network.ResourceTiming</a>: Timing information for the request.</li> <li><a href='#Network.Request'>Network.Request</a>: HTTP request data.</li> <li><a href='#Network.Response'>Network.Response</a>: HTTP response data.</li> <li><a href='#Network.WebSocketRequest'>Network.WebSocketRequest</a>: WebSocket request data.</li> <li><a href='#Network.WebSocketResponse'>Network.WebSocketResponse</a>: WebSocket response data.</li> <li><a href='#Network.WebSocketFrame'>Network.WebSocketFrame</a>: WebSocket frame data.</li> <li><a href='#Network.CachedResource'>Network.CachedResource</a>: Information about the cached resource.</li> <li><a href='#Network.Initiator'>Network.Initiator</a>: Information about the request initiator.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#Network.enable'>Network.enable</a>: Enables network tracking, network events will now be delivered to the client.</li> <li><a href='#Network.disable'>Network.disable</a>: Disables network tracking, prevents network events from being sent to the client.</li> <li><a href='#Network.setUserAgentOverride'>Network.setUserAgentOverride</a>: Allows overriding user agent with the given string.</li> <li><a href='#Network.setExtraHTTPHeaders'>Network.setExtraHTTPHeaders</a>: Specifies whether to always send extra HTTP headers with the requests from this page.</li> <li><a href='#Network.getResponseBody'>Network.getResponseBody</a>: Returns content served for the given request.</li> <li><a href='#Network.replayXHR'>Network.replayXHR</a>: This method sends a new XMLHttpRequest which is identical to the original one. The following parameters should be identical: method, url, async, request body, extra headers, withCredentials attribute, user, password.</li> <li><a href='#Network.canClearBrowserCache'>Network.canClearBrowserCache</a>: Tells whether clearing browser cache is supported.</li> <li><a href='#Network.clearBrowserCache'>Network.clearBrowserCache</a>: Clears browser cache.</li> <li><a href='#Network.canClearBrowserCookies'>Network.canClearBrowserCookies</a>: Tells whether clearing browser cookies is supported.</li> <li><a href='#Network.clearBrowserCookies'>Network.clearBrowserCookies</a>: Clears browser cookies.</li> <li><a href='#Network.setCacheDisabled'>Network.setCacheDisabled</a>: Toggles ignoring cache for each request. If true, cache will not be used.</li> <li><a href='#Network.loadResourceForFrontend'>Network.loadResourceForFrontend</a>: Loads a resource in the context of a frame on the inspected page without cross origin checks.</li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#Network.requestWillBeSent'>Network.requestWillBeSent</a>: Fired when page is about to send HTTP request.</li> <li><a href='#Network.requestServedFromCache'>Network.requestServedFromCache</a>: Fired if request ended up loading from cache.</li> <li><a href='#Network.responseReceived'>Network.responseReceived</a>: Fired when HTTP response is available.</li> <li><a href='#Network.dataReceived'>Network.dataReceived</a>: Fired when data chunk was received over the network.</li> <li><a href='#Network.loadingFinished'>Network.loadingFinished</a>: Fired when HTTP request has finished loading.</li> <li><a href='#Network.loadingFailed'>Network.loadingFailed</a>: Fired when HTTP request has failed to load.</li> <li><a href='#Network.webSocketWillSendHandshakeRequest'>Network.webSocketWillSendHandshakeRequest</a>: Fired when WebSocket is about to initiate handshake.</li> <li><a href='#Network.webSocketHandshakeResponseReceived'>Network.webSocketHandshakeResponseReceived</a>: Fired when WebSocket handshake response becomes available.</li> <li><a href='#Network.webSocketCreated'>Network.webSocketCreated</a>: Fired upon WebSocket creation.</li> <li><a href='#Network.webSocketClosed'>Network.webSocketClosed</a>: Fired when WebSocket is closed.</li> <li><a href='#Network.webSocketFrameReceived'>Network.webSocketFrameReceived</a>: Fired when WebSocket frame is received.</li> <li><a href='#Network.webSocketFrameError'>Network.webSocketFrameError</a>: Fired when WebSocket frame error occurs.</li> <li><a href='#Network.webSocketFrameSent'>Network.webSocketFrameSent</a>: Fired when WebSocket frame is sent.</li> </ul> <div id='Network_LoaderId' class='type'> <h3>Network.LoaderId <span class='label'>Type</span></h3> <p>Unique loader identifier.</p> <dl> <dd>String</dd> </dl> </div> <div id='Network_RequestId' class='type'> <h3>Network.RequestId <span class='label'>Type</span></h3> <p>Unique request identifier.</p> <dl> <dd>String</dd> </dl> </div> <div id='Network_Timestamp' class='type'> <h3>Network.Timestamp <span class='label'>Type</span></h3> <p>Number of seconds since epoch.</p> <dl> <dd>Number</dd> </dl> </div> <div id='Network_Headers' class='type'> <h3>Network.Headers <span class='label'>Type</span></h3> <p>Request / response headers as keys / values of JSON object.</p> </div> <div id='Network_ResourceTiming' class='type'> <h3>Network.ResourceTiming <span class='label'>Type</span></h3> <p>Timing information for the request.</p> <dl> <dt>requestTime</dt> <dd>Number <span class='text'>Timing's requestTime is a baseline in seconds, while the other numbers are ticks in milliseconds relatively to this requestTime.</span></dd> <dt>proxyStart</dt> <dd>Number <span class='text'>Started resolving proxy.</span></dd> <dt>proxyEnd</dt> <dd>Number <span class='text'>Finished resolving proxy.</span></dd> <dt>dnsStart</dt> <dd>Number <span class='text'>Started DNS address resolve.</span></dd> <dt>dnsEnd</dt> <dd>Number <span class='text'>Finished DNS address resolve.</span></dd> <dt>connectStart</dt> <dd>Number <span class='text'>Started connecting to the remote host.</span></dd> <dt>connectEnd</dt> <dd>Number <span class='text'>Connected to the remote host.</span></dd> <dt>sslStart</dt> <dd>Number <span class='text'>Started SSL handshake.</span></dd> <dt>sslEnd</dt> <dd>Number <span class='text'>Finished SSL handshake.</span></dd> <dt>sendStart</dt> <dd>Number <span class='text'>Started sending request.</span></dd> <dt>sendEnd</dt> <dd>Number <span class='text'>Finished sending request.</span></dd> <dt>receiveHeadersEnd</dt> <dd>Number <span class='text'>Finished receiving response headers.</span></dd> </dl> </div> <div id='Network_Request' class='type'> <h3>Network.Request <span class='label'>Type</span></h3> <p>HTTP request data.</p> <dl> <dt>url</dt> <dd>String <span class='text'>Request URL.</span></dd> <dt>method</dt> <dd>String <span class='text'>HTTP request method.</span></dd> <dt>headers</dt> <dd><a href='#Network.Headers'>Network.Headers</a> <span class='text'>HTTP request headers.</span></dd> <dt>postData (optional)</dt> <dd>String <span class='text'>HTTP POST request data.</span></dd> </dl> </div> <div id='Network_Response' class='type'> <h3>Network.Response <span class='label'>Type</span></h3> <p>HTTP response data.</p> <dl> <dt>url</dt> <dd>String <span class='text'>Response URL. This URL can be different from CachedResource.url in case of redirect.</span></dd> <dt>status</dt> <dd>Number <span class='text'>HTTP response status code.</span></dd> <dt>statusText</dt> <dd>String <span class='text'>HTTP response status text.</span></dd> <dt>headers</dt> <dd><a href='#Network.Headers'>Network.Headers</a> <span class='text'>HTTP response headers.</span></dd> <dt>headersText (optional)</dt> <dd>String <span class='text'>HTTP response headers text.</span></dd> <dt>mimeType</dt> <dd>String <span class='text'>Resource mimeType as determined by the browser.</span></dd> <dt>requestHeaders (optional)</dt> <dd><a href='#Network.Headers'>Network.Headers</a> <span class='text'>Refined HTTP request headers that were actually transmitted over the network.</span></dd> <dt>requestHeadersText (optional)</dt> <dd>String <span class='text'>HTTP request headers text.</span></dd> <dt>connectionReused</dt> <dd>Boolean <span class='text'>Specifies whether physical connection was actually reused for this request.</span></dd> <dt>connectionId</dt> <dd>Number <span class='text'>Physical connection id that was actually used for this request.</span></dd> <dt>fromDiskCache (optional)</dt> <dd>Boolean <span class='text'>Specifies that the request was served from the disk cache.</span></dd> <dt>timing (optional)</dt> <dd><a href='#Network.ResourceTiming'>Network.ResourceTiming</a> <span class='text'>Timing information for the given request.</span></dd> </dl> </div> <div id='Network_WebSocketRequest' class='type'> <h3>Network.WebSocketRequest <span class='label'>Type</span></h3> <p>WebSocket request data.</p> <dl> <dt>headers</dt> <dd><a href='#Network.Headers'>Network.Headers</a> <span class='text'>HTTP response headers.</span></dd> </dl> </div> <div id='Network_WebSocketResponse' class='type'> <h3>Network.WebSocketResponse <span class='label'>Type</span></h3> <p>WebSocket response data.</p> <dl> <dt>status</dt> <dd>Number <span class='text'>HTTP response status code.</span></dd> <dt>statusText</dt> <dd>String <span class='text'>HTTP response status text.</span></dd> <dt>headers</dt> <dd><a href='#Network.Headers'>Network.Headers</a> <span class='text'>HTTP response headers.</span></dd> </dl> </div> <div id='Network_WebSocketFrame' class='type'> <h3>Network.WebSocketFrame <span class='label'>Type</span></h3> <p>WebSocket frame data.</p> <dl> <dt>opcode</dt> <dd>Number <span class='text'>WebSocket frame opcode.</span></dd> <dt>mask</dt> <dd>Boolean <span class='text'>WebSocke frame mask.</span></dd> <dt>payloadData</dt> <dd>String <span class='text'>WebSocke frame payload data.</span></dd> </dl> </div> <div id='Network_CachedResource' class='type'> <h3>Network.CachedResource <span class='label'>Type</span></h3> <p>Information about the cached resource.</p> <dl> <dt>url</dt> <dd>String <span class='text'>Resource URL. This is the url of the original network request.</span></dd> <dt>type</dt> <dd><a href='#Page.ResourceType'>Page.ResourceType</a> <span class='text'>Type of this resource.</span></dd> <dt>response (optional)</dt> <dd><a href='#Network.Response'>Network.Response</a> <span class='text'>Cached response data.</span></dd> <dt>bodySize</dt> <dd>Number <span class='text'>Cached response body size.</span></dd> </dl> </div> <div id='Network_Initiator' class='type'> <h3>Network.Initiator <span class='label'>Type</span></h3> <p>Information about the request initiator.</p> <dl> <dt>type</dt> <dd>( parser | script | other ) <span class='text'>Type of this initiator.</span></dd> <dt>stackTrace (optional)</dt> <dd><a href='#Console.StackTrace'>Console.StackTrace</a> <span class='text'>Initiator JavaScript stack trace, set for Script only.</span></dd> <dt>url (optional)</dt> <dd>String <span class='text'>Initiator URL, set for Parser type only.</span></dd> <dt>lineNumber (optional)</dt> <dd>Number <span class='text'>Initiator line number, set for Parser type only.</span></dd> </dl> </div> <div id='Network_enable' class='command'> <h3>Network.enable <span class='label label-success'>Command</span></h3> <p>Enables network tracking, network events will now be delivered to the client.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Network.enable Network.enable(); </pre> </div> <div id='Network_disable' class='command'> <h3>Network.disable <span class='label label-success'>Command</span></h3> <p>Disables network tracking, prevents network events from being sent to the client.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Network.disable Network.disable(); </pre> </div> <div id='Network_setUserAgentOverride' class='command'> <h3>Network.setUserAgentOverride <span class='label label-success'>Command</span></h3> <p>Allows overriding user agent with the given string.</p> <dl> <dt>userAgent</dt> <dd>String <span class='text'>User agent to use.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Network.setUserAgentOverride Network.setUserAgentOverride(userAgent); </pre> </div> <div id='Network_setExtraHTTPHeaders' class='command'> <h3>Network.setExtraHTTPHeaders <span class='label label-success'>Command</span></h3> <p>Specifies whether to always send extra HTTP headers with the requests from this page.</p> <dl> <dt>headers</dt> <dd><a href='#Network.Headers'>Network.Headers</a> <span class='text'>Map with extra HTTP headers.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Network.setExtraHTTPHeaders Network.setExtraHTTPHeaders(headers); </pre> </div> <div id='Network_getResponseBody' class='command'> <h3>Network.getResponseBody <span class='label label-success'>Command</span></h3> <p>Returns content served for the given request.</p> <dl> <dt>requestId</dt> <dd><a href='#Network.RequestId'>Network.RequestId</a> <span class='text'>Identifier of the network request to get content for.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>body</dt> <dd>String <span class='text'>Response body.</span></dd> <dt>base64Encoded</dt> <dd>Boolean <span class='text'>True, if content was sent as base64.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Network.getResponseBody Network.getResponseBody(requestId, function callback(res) { // res = {body, base64Encoded} }); </pre> </div> <div id='Network_replayXHR' class='command'> <h3>Network.replayXHR <span class='label label-success'>Command</span></h3> <p>This method sends a new XMLHttpRequest which is identical to the original one. The following parameters should be identical: method, url, async, request body, extra headers, withCredentials attribute, user, password.</p> <dl> <dt>requestId</dt> <dd><a href='#Network.RequestId'>Network.RequestId</a> <span class='text'>Identifier of XHR to replay.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Network.replayXHR Network.replayXHR(requestId); </pre> </div> <div id='Network_canClearBrowserCache' class='command'> <h3>Network.canClearBrowserCache <span class='label label-success'>Command</span></h3> <p>Tells whether clearing browser cache is supported.</p> <h4>Callback Parameters:</h4> <dl> <dt>result</dt> <dd>Boolean <span class='text'>True if browser cache can be cleared.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Network.canClearBrowserCache Network.canClearBrowserCache(function callback(res) { // res = {result} }); </pre> </div> <div id='Network_clearBrowserCache' class='command'> <h3>Network.clearBrowserCache <span class='label label-success'>Command</span></h3> <p>Clears browser cache.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Network.clearBrowserCache Network.clearBrowserCache(); </pre> </div> <div id='Network_canClearBrowserCookies' class='command'> <h3>Network.canClearBrowserCookies <span class='label label-success'>Command</span></h3> <p>Tells whether clearing browser cookies is supported.</p> <h4>Callback Parameters:</h4> <dl> <dt>result</dt> <dd>Boolean <span class='text'>True if browser cookies can be cleared.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Network.canClearBrowserCookies Network.canClearBrowserCookies(function callback(res) { // res = {result} }); </pre> </div> <div id='Network_clearBrowserCookies' class='command'> <h3>Network.clearBrowserCookies <span class='label label-success'>Command</span></h3> <p>Clears browser cookies.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Network.clearBrowserCookies Network.clearBrowserCookies(); </pre> </div> <div id='Network_setCacheDisabled' class='command'> <h3>Network.setCacheDisabled <span class='label label-success'>Command</span></h3> <p>Toggles ignoring cache for each request. If <code>true</code>, cache will not be used.</p> <dl> <dt>cacheDisabled</dt> <dd>Boolean <span class='text'>Cache disabled state.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Network.setCacheDisabled Network.setCacheDisabled(cacheDisabled); </pre> </div> <div id='Network_loadResourceForFrontend' class='command'> <h3>Network.loadResourceForFrontend <span class='label label-success'>Command</span></h3> <p>Loads a resource in the context of a frame on the inspected page without cross origin checks.</p> <dl> <dt>frameId</dt> <dd><a href='#Page.FrameId'>Page.FrameId</a> <span class='text'>Frame to load the resource from.</span></dd> <dt>url</dt> <dd>String <span class='text'>URL of the resource to load.</span></dd> <dt>requestHeaders (optional)</dt> <dd><a href='#Network.Headers'>Network.Headers</a> <span class='text'>Request headers.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>statusCode</dt> <dd>Number <span class='text'>HTTP status code.</span></dd> <dt>responseHeaders</dt> <dd><a href='#Network.Headers'>Network.Headers</a> <span class='text'>Response headers.</span></dd> <dt>content</dt> <dd>String <span class='text'>Resource content.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Network.loadResourceForFrontend Network.loadResourceForFrontend(frameId, url, requestHeaders, function callback(res) { // res = {statusCode, responseHeaders, content} }); </pre> </div> <div id='Network_requestWillBeSent' class='command'> <h3>Network.requestWillBeSent <span class='label label-info'>Event</span></h3> <p>Fired when page is about to send HTTP request.</p> <dl> <dt>requestId</dt> <dd><a href='#Network.RequestId'>Network.RequestId</a> <span class='text'>Request identifier.</span></dd> <dt>frameId</dt> <dd><a href='#Page.FrameId'>Page.FrameId</a> <span class='text'>Frame identifier.</span></dd> <dt>loaderId</dt> <dd><a href='#Network.LoaderId'>Network.LoaderId</a> <span class='text'>Loader identifier.</span></dd> <dt>documentURL</dt> <dd>String <span class='text'>URL of the document this request is loaded for.</span></dd> <dt>request</dt> <dd><a href='#Network.Request'>Network.Request</a> <span class='text'>Request data.</span></dd> <dt>timestamp</dt> <dd><a href='#Network.Timestamp'>Network.Timestamp</a> <span class='text'>Timestamp.</span></dd> <dt>initiator</dt> <dd><a href='#Network.Initiator'>Network.Initiator</a> <span class='text'>Request initiator.</span></dd> <dt>redirectResponse (optional)</dt> <dd><a href='#Network.Response'>Network.Response</a> <span class='text'>Redirect response data.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Network.requestWillBeSent function onRequestWillBeSent(res) { // res = {requestId, frameId, loaderId, documentURL, request, timestamp, initiator, redirectResponse} } </pre> </div> <div id='Network_requestServedFromCache' class='command'> <h3>Network.requestServedFromCache <span class='label label-info'>Event</span></h3> <p>Fired if request ended up loading from cache.</p> <dl> <dt>requestId</dt> <dd><a href='#Network.RequestId'>Network.RequestId</a> <span class='text'>Request identifier.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Network.requestServedFromCache function onRequestServedFromCache(res) { // res = {requestId} } </pre> </div> <div id='Network_responseReceived' class='command'> <h3>Network.responseReceived <span class='label label-info'>Event</span></h3> <p>Fired when HTTP response is available.</p> <dl> <dt>requestId</dt> <dd><a href='#Network.RequestId'>Network.RequestId</a> <span class='text'>Request identifier.</span></dd> <dt>frameId</dt> <dd><a href='#Page.FrameId'>Page.FrameId</a> <span class='text'>Frame identifier.</span></dd> <dt>loaderId</dt> <dd><a href='#Network.LoaderId'>Network.LoaderId</a> <span class='text'>Loader identifier.</span></dd> <dt>timestamp</dt> <dd><a href='#Network.Timestamp'>Network.Timestamp</a> <span class='text'>Timestamp.</span></dd> <dt>type</dt> <dd><a href='#Page.ResourceType'>Page.ResourceType</a> <span class='text'>Resource type.</span></dd> <dt>response</dt> <dd><a href='#Network.Response'>Network.Response</a> <span class='text'>Response data.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Network.responseReceived function onResponseReceived(res) { // res = {requestId, frameId, loaderId, timestamp, type, response} } </pre> </div> <div id='Network_dataReceived' class='command'> <h3>Network.dataReceived <span class='label label-info'>Event</span></h3> <p>Fired when data chunk was received over the network.</p> <dl> <dt>requestId</dt> <dd><a href='#Network.RequestId'>Network.RequestId</a> <span class='text'>Request identifier.</span></dd> <dt>timestamp</dt> <dd><a href='#Network.Timestamp'>Network.Timestamp</a> <span class='text'>Timestamp.</span></dd> <dt>dataLength</dt> <dd>Integer <span class='text'>Data chunk length.</span></dd> <dt>encodedDataLength</dt> <dd>Integer <span class='text'>Actual bytes received (might be less than dataLength for compressed encodings).</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Network.dataReceived function onDataReceived(res) { // res = {requestId, timestamp, dataLength, encodedDataLength} } </pre> </div> <div id='Network_loadingFinished' class='command'> <h3>Network.loadingFinished <span class='label label-info'>Event</span></h3> <p>Fired when HTTP request has finished loading.</p> <dl> <dt>requestId</dt> <dd><a href='#Network.RequestId'>Network.RequestId</a> <span class='text'>Request identifier.</span></dd> <dt>timestamp</dt> <dd><a href='#Network.Timestamp'>Network.Timestamp</a> <span class='text'>Timestamp.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Network.loadingFinished function onLoadingFinished(res) { // res = {requestId, timestamp} } </pre> </div> <div id='Network_loadingFailed' class='command'> <h3>Network.loadingFailed <span class='label label-info'>Event</span></h3> <p>Fired when HTTP request has failed to load.</p> <dl> <dt>requestId</dt> <dd><a href='#Network.RequestId'>Network.RequestId</a> <span class='text'>Request identifier.</span></dd> <dt>timestamp</dt> <dd><a href='#Network.Timestamp'>Network.Timestamp</a> <span class='text'>Timestamp.</span></dd> <dt>errorText</dt> <dd>String <span class='text'>User friendly error message.</span></dd> <dt>canceled (optional)</dt> <dd>Boolean <span class='text'>True if loading was canceled.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Network.loadingFailed function onLoadingFailed(res) { // res = {requestId, timestamp, errorText, canceled} } </pre> </div> <div id='Network_webSocketWillSendHandshakeRequest' class='command'> <h3>Network.webSocketWillSendHandshakeRequest <span class='label label-info'>Event</span></h3> <p>Fired when WebSocket is about to initiate handshake.</p> <dl> <dt>requestId</dt> <dd><a href='#Network.RequestId'>Network.RequestId</a> <span class='text'>Request identifier.</span></dd> <dt>timestamp</dt> <dd><a href='#Network.Timestamp'>Network.Timestamp</a> <span class='text'>Timestamp.</span></dd> <dt>request</dt> <dd><a href='#Network.WebSocketRequest'>Network.WebSocketRequest</a> <span class='text'>WebSocket request data.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Network.webSocketWillSendHandshakeRequest function onWebSocketWillSendHandshakeRequest(res) { // res = {requestId, timestamp, request} } </pre> </div> <div id='Network_webSocketHandshakeResponseReceived' class='command'> <h3>Network.webSocketHandshakeResponseReceived <span class='label label-info'>Event</span></h3> <p>Fired when WebSocket handshake response becomes available.</p> <dl> <dt>requestId</dt> <dd><a href='#Network.RequestId'>Network.RequestId</a> <span class='text'>Request identifier.</span></dd> <dt>timestamp</dt> <dd><a href='#Network.Timestamp'>Network.Timestamp</a> <span class='text'>Timestamp.</span></dd> <dt>response</dt> <dd><a href='#Network.WebSocketResponse'>Network.WebSocketResponse</a> <span class='text'>WebSocket response data.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Network.webSocketHandshakeResponseReceived function onWebSocketHandshakeResponseReceived(res) { // res = {requestId, timestamp, response} } </pre> </div> <div id='Network_webSocketCreated' class='command'> <h3>Network.webSocketCreated <span class='label label-info'>Event</span></h3> <p>Fired upon WebSocket creation.</p> <dl> <dt>requestId</dt> <dd><a href='#Network.RequestId'>Network.RequestId</a> <span class='text'>Request identifier.</span></dd> <dt>url</dt> <dd>String <span class='text'>WebSocket request URL.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Network.webSocketCreated function onWebSocketCreated(res) { // res = {requestId, url} } </pre> </div> <div id='Network_webSocketClosed' class='command'> <h3>Network.webSocketClosed <span class='label label-info'>Event</span></h3> <p>Fired when WebSocket is closed.</p> <dl> <dt>requestId</dt> <dd><a href='#Network.RequestId'>Network.RequestId</a> <span class='text'>Request identifier.</span></dd> <dt>timestamp</dt> <dd><a href='#Network.Timestamp'>Network.Timestamp</a> <span class='text'>Timestamp.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Network.webSocketClosed function onWebSocketClosed(res) { // res = {requestId, timestamp} } </pre> </div> <div id='Network_webSocketFrameReceived' class='command'> <h3>Network.webSocketFrameReceived <span class='label label-info'>Event</span></h3> <p>Fired when WebSocket frame is received.</p> <dl> <dt>requestId</dt> <dd><a href='#Network.RequestId'>Network.RequestId</a> <span class='text'>Request identifier.</span></dd> <dt>timestamp</dt> <dd><a href='#Network.Timestamp'>Network.Timestamp</a> <span class='text'>Timestamp.</span></dd> <dt>response</dt> <dd><a href='#Network.WebSocketFrame'>Network.WebSocketFrame</a> <span class='text'>WebSocket response data.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Network.webSocketFrameReceived function onWebSocketFrameReceived(res) { // res = {requestId, timestamp, response} } </pre> </div> <div id='Network_webSocketFrameError' class='command'> <h3>Network.webSocketFrameError <span class='label label-info'>Event</span></h3> <p>Fired when WebSocket frame error occurs.</p> <dl> <dt>requestId</dt> <dd><a href='#Network.RequestId'>Network.RequestId</a> <span class='text'>Request identifier.</span></dd> <dt>timestamp</dt> <dd><a href='#Network.Timestamp'>Network.Timestamp</a> <span class='text'>Timestamp.</span></dd> <dt>errorMessage</dt> <dd>String <span class='text'>WebSocket frame error message.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Network.webSocketFrameError function onWebSocketFrameError(res) { // res = {requestId, timestamp, errorMessage} } </pre> </div> <div id='Network_webSocketFrameSent' class='command'> <h3>Network.webSocketFrameSent <span class='label label-info'>Event</span></h3> <p>Fired when WebSocket frame is sent.</p> <dl> <dt>requestId</dt> <dd><a href='#Network.RequestId'>Network.RequestId</a> <span class='text'>Request identifier.</span></dd> <dt>timestamp</dt> <dd><a href='#Network.Timestamp'>Network.Timestamp</a> <span class='text'>Timestamp.</span></dd> <dt>response</dt> <dd><a href='#Network.WebSocketFrame'>Network.WebSocketFrame</a> <span class='text'>WebSocket response data.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Network.webSocketFrameSent function onWebSocketFrameSent(res) { // res = {requestId, timestamp, response} } </pre> </div> </section> <section id='Page' class='domain'> <h1>Page</h1> <p>Actions and events related to the inspected page belong to the page domain.</p> <span class='label'>Type</span> <ul> <li><a href='#Page.ResourceType'>Page.ResourceType</a>: Resource type as it was perceived by the rendering engine.</li> <li><a href='#Page.FrameId'>Page.FrameId</a>: Unique frame identifier.</li> <li><a href='#Page.Frame'>Page.Frame</a>: Information about the Frame on the page.</li> <li><a href='#Page.FrameResourceTree'>Page.FrameResourceTree</a>: Information about the Frame hierarchy along with their cached resources.</li> <li><a href='#Page.SearchMatch'>Page.SearchMatch</a>: Search match for resource.</li> <li><a href='#Page.SearchResult'>Page.SearchResult</a>: Search result for resource.</li> <li><a href='#Page.Cookie'>Page.Cookie</a>: Cookie object</li> <li><a href='#Page.ScriptIdentifier'>Page.ScriptIdentifier</a>: Unique script identifier.</li> <li><a href='#Page.NavigationEntry'>Page.NavigationEntry</a>: Navigation history entry.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#Page.enable'>Page.enable</a>: Enables page domain notifications.</li> <li><a href='#Page.disable'>Page.disable</a>: Disables page domain notifications.</li> <li><a href='#Page.addScriptToEvaluateOnLoad'>Page.addScriptToEvaluateOnLoad</a></li> <li><a href='#Page.removeScriptToEvaluateOnLoad'>Page.removeScriptToEvaluateOnLoad</a></li> <li><a href='#Page.reload'>Page.reload</a>: Reloads given page optionally ignoring the cache.</li> <li><a href='#Page.navigate'>Page.navigate</a>: Navigates current page to the given URL.</li> <li><a href='#Page.getNavigationHistory'>Page.getNavigationHistory</a>: Returns navigation history for the current page.</li> <li><a href='#Page.navigateToHistoryEntry'>Page.navigateToHistoryEntry</a>: Navigates current page to the given history entry.</li> <li><a href='#Page.getCookies'>Page.getCookies</a>: Returns all browser cookies. Depending on the backend support, will either return detailed cookie information in the cookie field or string cookie representation using cookieString.</li> <li><a href='#Page.deleteCookie'>Page.deleteCookie</a>: Deletes browser cookie with given name, domain and path.</li> <li><a href='#Page.getResourceTree'>Page.getResourceTree</a>: Returns present frame / resource tree structure.</li> <li><a href='#Page.getResourceContent'>Page.getResourceContent</a>: Returns content of the given resource.</li> <li><a href='#Page.searchInResource'>Page.searchInResource</a>: Searches for given string in resource content.</li> <li><a href='#Page.searchInResources'>Page.searchInResources</a>: Searches for given string in frame / resource tree structure.</li> <li><a href='#Page.setDocumentContent'>Page.setDocumentContent</a>: Sets given markup as the document's HTML.</li> <li><a href='#Page.setDeviceMetricsOverride'>Page.setDeviceMetricsOverride</a>: Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results) and the font scale factor.</li> <li><a href='#Page.setShowPaintRects'>Page.setShowPaintRects</a>: Requests that backend shows paint rectangles</li> <li><a href='#Page.setShowDebugBorders'>Page.setShowDebugBorders</a>: Requests that backend shows debug borders on layers</li> <li><a href='#Page.setShowFPSCounter'>Page.setShowFPSCounter</a>: Requests that backend shows the FPS counter</li> <li><a href='#Page.setContinuousPaintingEnabled'>Page.setContinuousPaintingEnabled</a>: Requests that backend enables continuous painting</li> <li><a href='#Page.setShowScrollBottleneckRects'>Page.setShowScrollBottleneckRects</a>: Requests that backend shows scroll bottleneck rects</li> <li><a href='#Page.getScriptExecutionStatus'>Page.getScriptExecutionStatus</a>: Determines if scripts can be executed in the page.</li> <li><a href='#Page.setScriptExecutionDisabled'>Page.setScriptExecutionDisabled</a>: Switches script execution in the page.</li> <li><a href='#Page.setGeolocationOverride'>Page.setGeolocationOverride</a>: Overrides the Geolocation Position or Error.</li> <li><a href='#Page.clearGeolocationOverride'>Page.clearGeolocationOverride</a>: Clears the overriden Geolocation Position and Error.</li> <li><a href='#Page.setDeviceOrientationOverride'>Page.setDeviceOrientationOverride</a>: Overrides the Device Orientation.</li> <li><a href='#Page.clearDeviceOrientationOverride'>Page.clearDeviceOrientationOverride</a>: Clears the overridden Device Orientation.</li> <li><a href='#Page.setTouchEmulationEnabled'>Page.setTouchEmulationEnabled</a>: Toggles mouse event-based touch event emulation.</li> <li><a href='#Page.setEmulatedMedia'>Page.setEmulatedMedia</a>: Emulates the given media for CSS media queries.</li> <li><a href='#Page.captureScreenshot'>Page.captureScreenshot</a>: Capture page screenshot.</li> <li><a href='#Page.startScreencast'>Page.startScreencast</a>: Starts sending each frame using the screencastFrame event.</li> <li><a href='#Page.stopScreencast'>Page.stopScreencast</a>: Stops sending each frame in the screencastFrame.</li> <li><a href='#Page.handleJavaScriptDialog'>Page.handleJavaScriptDialog</a>: Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).</li> <li><a href='#Page.setShowViewportSizeOnResize'>Page.setShowViewportSizeOnResize</a>: Paints viewport size upon main frame resize.</li> <li><a href='#Page.setForceCompositingMode'>Page.setForceCompositingMode</a>: Force accelerated compositing mode for inspected page.</li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#Page.domContentEventFired'>Page.domContentEventFired</a></li> <li><a href='#Page.loadEventFired'>Page.loadEventFired</a></li> <li><a href='#Page.frameAttached'>Page.frameAttached</a>: Fired when frame has been attached to its parent.</li> <li><a href='#Page.frameNavigated'>Page.frameNavigated</a>: Fired once navigation of the frame has completed. Frame is now associated with the new loader.</li> <li><a href='#Page.frameDetached'>Page.frameDetached</a>: Fired when frame has been detached from its parent.</li> <li><a href='#Page.frameStartedLoading'>Page.frameStartedLoading</a>: Fired when frame has started loading.</li> <li><a href='#Page.frameStoppedLoading'>Page.frameStoppedLoading</a>: Fired when frame has stopped loading.</li> <li><a href='#Page.frameScheduledNavigation'>Page.frameScheduledNavigation</a>: Fired when frame schedules a potential navigation.</li> <li><a href='#Page.frameClearedScheduledNavigation'>Page.frameClearedScheduledNavigation</a>: Fired when frame no longer has a scheduled navigation.</li> <li><a href='#Page.javascriptDialogOpening'>Page.javascriptDialogOpening</a>: Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.</li> <li><a href='#Page.javascriptDialogClosed'>Page.javascriptDialogClosed</a>: Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.</li> <li><a href='#Page.scriptsEnabled'>Page.scriptsEnabled</a>: Fired when the JavaScript is enabled/disabled on the page</li> <li><a href='#Page.screencastFrame'>Page.screencastFrame</a>: Compressed image data requested by the startScreencast.</li> <li><a href='#Page.screencastVisibilityChanged'>Page.screencastVisibilityChanged</a>: Fired when the page with currently enabled screencast was shown or hidden .</li> </ul> <div id='Page_ResourceType' class='type'> <h3>Page.ResourceType <span class='label'>Type</span></h3> <p>Resource type as it was perceived by the rendering engine.</p> <dl> <dd>( Document | Stylesheet | Image | Font | Script | XHR | WebSocket | Other )</dd> </dl> </div> <div id='Page_FrameId' class='type'> <h3>Page.FrameId <span class='label'>Type</span></h3> <p>Unique frame identifier.</p> <dl> <dd>String</dd> </dl> </div> <div id='Page_Frame' class='type'> <h3>Page.Frame <span class='label'>Type</span></h3> <p>Information about the Frame on the page.</p> <dl> <dt>id</dt> <dd>String <span class='text'>Frame unique identifier.</span></dd> <dt>parentId (optional)</dt> <dd>String <span class='text'>Parent frame identifier.</span></dd> <dt>loaderId</dt> <dd><a href='#Network.LoaderId'>Network.LoaderId</a> <span class='text'>Identifier of the loader associated with this frame.</span></dd> <dt>name (optional)</dt> <dd>String <span class='text'>Frame's name as specified in the tag.</span></dd> <dt>url</dt> <dd>String <span class='text'>Frame document's URL.</span></dd> <dt>securityOrigin</dt> <dd>String <span class='text'>Frame document's security origin.</span></dd> <dt>mimeType</dt> <dd>String <span class='text'>Frame document's mimeType as determined by the browser.</span></dd> </dl> </div> <div id='Page_FrameResourceTree' class='type'> <h3>Page.FrameResourceTree <span class='label'>Type</span></h3> <p>Information about the Frame hierarchy along with their cached resources.</p> <dl> <dt>frame</dt> <dd><a href='#Page.Frame'>Page.Frame</a> <span class='text'>Frame information for this tree item.</span></dd> <dt>childFrames (optional)</dt> <dd>[<a href='#Page.FrameResourceTree'>Page.FrameResourceTree</a>] <span class='text'>Child frames.</span></dd> <dt>resources</dt> <dd>[Object] <span class='text'>Information about frame resources.</span></dd> </dl> </div> <div id='Page_SearchMatch' class='type'> <h3>Page.SearchMatch <span class='label'>Type</span></h3> <p>Search match for resource.</p> <dl> <dt>lineNumber</dt> <dd>Number <span class='text'>Line number in resource content.</span></dd> <dt>lineContent</dt> <dd>String <span class='text'>Line with match content.</span></dd> </dl> </div> <div id='Page_SearchResult' class='type'> <h3>Page.SearchResult <span class='label'>Type</span></h3> <p>Search result for resource.</p> <dl> <dt>url</dt> <dd>String <span class='text'>Resource URL.</span></dd> <dt>frameId</dt> <dd><a href='#Page.FrameId'>Page.FrameId</a> <span class='text'>Resource frame id.</span></dd> <dt>matchesCount</dt> <dd>Number <span class='text'>Number of matches in the resource content.</span></dd> </dl> </div> <div id='Page_Cookie' class='type'> <h3>Page.Cookie <span class='label'>Type</span></h3> <p>Cookie object</p> <dl> <dt>name</dt> <dd>String <span class='text'>Cookie name.</span></dd> <dt>value</dt> <dd>String <span class='text'>Cookie value.</span></dd> <dt>domain</dt> <dd>String <span class='text'>Cookie domain.</span></dd> <dt>path</dt> <dd>String <span class='text'>Cookie path.</span></dd> <dt>expires</dt> <dd>Number <span class='text'>Cookie expires.</span></dd> <dt>size</dt> <dd>Integer <span class='text'>Cookie size.</span></dd> <dt>httpOnly</dt> <dd>Boolean <span class='text'>True if cookie is http-only.</span></dd> <dt>secure</dt> <dd>Boolean <span class='text'>True if cookie is secure.</span></dd> <dt>session</dt> <dd>Boolean <span class='text'>True in case of session cookie.</span></dd> </dl> </div> <div id='Page_ScriptIdentifier' class='type'> <h3>Page.ScriptIdentifier <span class='label'>Type</span></h3> <p>Unique script identifier.</p> <dl> <dd>String</dd> </dl> </div> <div id='Page_NavigationEntry' class='type'> <h3>Page.NavigationEntry <span class='label'>Type</span></h3> <p>Navigation history entry.</p> <dl> <dt>id</dt> <dd>Integer <span class='text'>Unique id of the navigation history entry.</span></dd> <dt>url</dt> <dd>String <span class='text'>URL of the navigation history entry.</span></dd> <dt>title</dt> <dd>String <span class='text'>Title of the navigation history entry.</span></dd> </dl> </div> <div id='Page_enable' class='command'> <h3>Page.enable <span class='label label-success'>Command</span></h3> <p>Enables page domain notifications.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.enable Page.enable(); </pre> </div> <div id='Page_disable' class='command'> <h3>Page.disable <span class='label label-success'>Command</span></h3> <p>Disables page domain notifications.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.disable Page.disable(); </pre> </div> <div id='Page_addScriptToEvaluateOnLoad' class='command'> <h3>Page.addScriptToEvaluateOnLoad <span class='label label-success'>Command</span></h3> <dl> <dt>scriptSource</dt> <dd>String</dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>identifier</dt> <dd><a href='#Page.ScriptIdentifier'>Page.ScriptIdentifier</a> <span class='text'>Identifier of the added script.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.addScriptToEvaluateOnLoad Page.addScriptToEvaluateOnLoad(scriptSource, function callback(res) { // res = {identifier} }); </pre> </div> <div id='Page_removeScriptToEvaluateOnLoad' class='command'> <h3>Page.removeScriptToEvaluateOnLoad <span class='label label-success'>Command</span></h3> <dl> <dt>identifier</dt> <dd><a href='#Page.ScriptIdentifier'>Page.ScriptIdentifier</a></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.removeScriptToEvaluateOnLoad Page.removeScriptToEvaluateOnLoad(identifier); </pre> </div> <div id='Page_reload' class='command'> <h3>Page.reload <span class='label label-success'>Command</span></h3> <p>Reloads given page optionally ignoring the cache.</p> <dl> <dt>ignoreCache (optional)</dt> <dd>Boolean <span class='text'>If true, browser cache is ignored (as if the user pressed Shift+refresh).</span></dd> <dt>scriptToEvaluateOnLoad (optional)</dt> <dd>String <span class='text'>If set, the script will be injected into all frames of the inspected page after reload.</span></dd> <dt>scriptPreprocessor (optional)</dt> <dd>String <span class='text'>Script body that should evaluate to function that will preprocess all the scripts before their compilation.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.reload Page.reload(ignoreCache, scriptToEvaluateOnLoad, scriptPreprocessor); </pre> </div> <div id='Page_navigate' class='command'> <h3>Page.navigate <span class='label label-success'>Command</span></h3> <p>Navigates current page to the given URL.</p> <dl> <dt>url</dt> <dd>String <span class='text'>URL to navigate the page to.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.navigate Page.navigate(url); </pre> </div> <div id='Page_getNavigationHistory' class='command'> <h3>Page.getNavigationHistory <span class='label label-success'>Command</span></h3> <p>Returns navigation history for the current page.</p> <dl> </dl> <h4>Callback Parameters:</h4> <dl> <dt>currentIndex</dt> <dd>Integer <span class='text'>Index of the current navigation history entry.</span></dd> <dt>entries</dt> <dd>[<a href='#Page.NavigationEntry'>Page.NavigationEntry</a>] <span class='text'>Array of navigation history entries.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.getNavigationHistory Page.getNavigationHistory(function callback(res) { // res = {currentIndex, entries} }); </pre> </div> <div id='Page_navigateToHistoryEntry' class='command'> <h3>Page.navigateToHistoryEntry <span class='label label-success'>Command</span></h3> <p>Navigates current page to the given history entry.</p> <dl> <dt>entryId</dt> <dd>Integer <span class='text'>Unique id of the entry to navigate to.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.navigateToHistoryEntry Page.navigateToHistoryEntry(entryId); </pre> </div> <div id='Page_getCookies' class='command'> <h3>Page.getCookies <span class='label label-success'>Command</span></h3> <p>Returns all browser cookies. Depending on the backend support, will either return detailed cookie information in the <code>cookie</code> field or string cookie representation using <code>cookieString</code>.</p> <h4>Callback Parameters:</h4> <dl> <dt>cookies</dt> <dd>[<a href='#Page.Cookie'>Page.Cookie</a>] <span class='text'>Array of cookie objects.</span></dd> <dt>cookiesString</dt> <dd>String <span class='text'>document.cookie string representation of the cookies.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.getCookies Page.getCookies(function callback(res) { // res = {cookies, cookiesString} }); </pre> </div> <div id='Page_deleteCookie' class='command'> <h3>Page.deleteCookie <span class='label label-success'>Command</span></h3> <p>Deletes browser cookie with given name, domain and path.</p> <dl> <dt>cookieName</dt> <dd>String <span class='text'>Name of the cookie to remove.</span></dd> <dt>url</dt> <dd>String <span class='text'>URL to match cooke domain and path.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.deleteCookie Page.deleteCookie(cookieName, url); </pre> </div> <div id='Page_getResourceTree' class='command'> <h3>Page.getResourceTree <span class='label label-success'>Command</span></h3> <p>Returns present frame / resource tree structure.</p> <h4>Callback Parameters:</h4> <dl> <dt>frameTree</dt> <dd><a href='#Page.FrameResourceTree'>Page.FrameResourceTree</a> <span class='text'>Present frame / resource tree structure.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.getResourceTree Page.getResourceTree(function callback(res) { // res = {frameTree} }); </pre> </div> <div id='Page_getResourceContent' class='command'> <h3>Page.getResourceContent <span class='label label-success'>Command</span></h3> <p>Returns content of the given resource.</p> <dl> <dt>frameId</dt> <dd><a href='#Page.FrameId'>Page.FrameId</a> <span class='text'>Frame id to get resource for.</span></dd> <dt>url</dt> <dd>String <span class='text'>URL of the resource to get content for.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>content</dt> <dd>String <span class='text'>Resource content.</span></dd> <dt>base64Encoded</dt> <dd>Boolean <span class='text'>True, if content was served as base64.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.getResourceContent Page.getResourceContent(frameId, url, function callback(res) { // res = {content, base64Encoded} }); </pre> </div> <div id='Page_searchInResource' class='command'> <h3>Page.searchInResource <span class='label label-success'>Command</span></h3> <p>Searches for given string in resource content.</p> <dl> <dt>frameId</dt> <dd><a href='#Page.FrameId'>Page.FrameId</a> <span class='text'>Frame id for resource to search in.</span></dd> <dt>url</dt> <dd>String <span class='text'>URL of the resource to search in.</span></dd> <dt>query</dt> <dd>String <span class='text'>String to search for.</span></dd> <dt>caseSensitive (optional)</dt> <dd>Boolean <span class='text'>If true, search is case sensitive.</span></dd> <dt>isRegex (optional)</dt> <dd>Boolean <span class='text'>If true, treats string parameter as regex.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>result</dt> <dd>[<a href='#Page.SearchMatch'>Page.SearchMatch</a>] <span class='text'>List of search matches.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.searchInResource Page.searchInResource(frameId, url, query, caseSensitive, isRegex, function callback(res) { // res = {result} }); </pre> </div> <div id='Page_searchInResources' class='command'> <h3>Page.searchInResources <span class='label label-success'>Command</span></h3> <p>Searches for given string in frame / resource tree structure.</p> <dl> <dt>text</dt> <dd>String <span class='text'>String to search for.</span></dd> <dt>caseSensitive (optional)</dt> <dd>Boolean <span class='text'>If true, search is case sensitive.</span></dd> <dt>isRegex (optional)</dt> <dd>Boolean <span class='text'>If true, treats string parameter as regex.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>result</dt> <dd>[<a href='#Page.SearchResult'>Page.SearchResult</a>] <span class='text'>List of search results.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.searchInResources Page.searchInResources(text, caseSensitive, isRegex, function callback(res) { // res = {result} }); </pre> </div> <div id='Page_setDocumentContent' class='command'> <h3>Page.setDocumentContent <span class='label label-success'>Command</span></h3> <p>Sets given markup as the document's HTML.</p> <dl> <dt>frameId</dt> <dd><a href='#Page.FrameId'>Page.FrameId</a> <span class='text'>Frame id to set HTML for.</span></dd> <dt>html</dt> <dd>String <span class='text'>HTML content to set.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.setDocumentContent Page.setDocumentContent(frameId, html); </pre> </div> <div id='Page_setDeviceMetricsOverride' class='command'> <h3>Page.setDeviceMetricsOverride <span class='label label-success'>Command</span></h3> <p>Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results) and the font scale factor.</p> <dl> <dt>width</dt> <dd>Integer <span class='text'>Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.</span></dd> <dt>height</dt> <dd>Integer <span class='text'>Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.</span></dd> <dt>fontScaleFactor</dt> <dd>Number <span class='text'>Overriding font scale factor value (must be positive). 1 disables the override.</span></dd> <dt>fitWindow</dt> <dd>Boolean <span class='text'>Whether a view that exceeds the available browser window area should be scaled down to fit.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.setDeviceMetricsOverride Page.setDeviceMetricsOverride(width, height, fontScaleFactor, fitWindow); </pre> </div> <div id='Page_setShowPaintRects' class='command'> <h3>Page.setShowPaintRects <span class='label label-success'>Command</span></h3> <p>Requests that backend shows paint rectangles</p> <dl> <dt>result</dt> <dd>Boolean <span class='text'>True for showing paint rectangles</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.setShowPaintRects Page.setShowPaintRects(result); </pre> </div> <div id='Page_setShowDebugBorders' class='command'> <h3>Page.setShowDebugBorders <span class='label label-success'>Command</span></h3> <p>Requests that backend shows debug borders on layers</p> <dl> <dt>show</dt> <dd>Boolean <span class='text'>True for showing debug borders</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.setShowDebugBorders Page.setShowDebugBorders(show); </pre> </div> <div id='Page_setShowFPSCounter' class='command'> <h3>Page.setShowFPSCounter <span class='label label-success'>Command</span></h3> <p>Requests that backend shows the FPS counter</p> <dl> <dt>show</dt> <dd>Boolean <span class='text'>True for showing the FPS counter</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.setShowFPSCounter Page.setShowFPSCounter(show); </pre> </div> <div id='Page_setContinuousPaintingEnabled' class='command'> <h3>Page.setContinuousPaintingEnabled <span class='label label-success'>Command</span></h3> <p>Requests that backend enables continuous painting</p> <dl> <dt>enabled</dt> <dd>Boolean <span class='text'>True for enabling cointinuous painting</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.setContinuousPaintingEnabled Page.setContinuousPaintingEnabled(enabled); </pre> </div> <div id='Page_setShowScrollBottleneckRects' class='command'> <h3>Page.setShowScrollBottleneckRects <span class='label label-success'>Command</span></h3> <p>Requests that backend shows scroll bottleneck rects</p> <dl> <dt>show</dt> <dd>Boolean <span class='text'>True for showing scroll bottleneck rects</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.setShowScrollBottleneckRects Page.setShowScrollBottleneckRects(show); </pre> </div> <div id='Page_getScriptExecutionStatus' class='command'> <h3>Page.getScriptExecutionStatus <span class='label label-success'>Command</span></h3> <p>Determines if scripts can be executed in the page.</p> <h4>Callback Parameters:</h4> <dl> <dt>result</dt> <dd>( allowed | disabled | forbidden ) <span class='text'>Script execution status: "allowed" if scripts can be executed, "disabled" if script execution has been disabled through page settings, "forbidden" if script execution for the given page is not possible for other reasons.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.getScriptExecutionStatus Page.getScriptExecutionStatus(function callback(res) { // res = {result} }); </pre> </div> <div id='Page_setScriptExecutionDisabled' class='command'> <h3>Page.setScriptExecutionDisabled <span class='label label-success'>Command</span></h3> <p>Switches script execution in the page.</p> <dl> <dt>value</dt> <dd>Boolean <span class='text'>Whether script execution should be disabled in the page.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.setScriptExecutionDisabled Page.setScriptExecutionDisabled(value); </pre> </div> <div id='Page_setGeolocationOverride' class='command'> <h3>Page.setGeolocationOverride <span class='label label-success'>Command</span></h3> <p>Overrides the Geolocation Position or Error.</p> <dl> <dt>latitude (optional)</dt> <dd>Number <span class='text'>Mock longitude</span></dd> <dt>longitude (optional)</dt> <dd>Number <span class='text'>Mock latitude</span></dd> <dt>accuracy (optional)</dt> <dd>Number <span class='text'>Mock accuracy</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.setGeolocationOverride Page.setGeolocationOverride(latitude, longitude, accuracy); </pre> </div> <div id='Page_clearGeolocationOverride' class='command'> <h3>Page.clearGeolocationOverride <span class='label label-success'>Command</span></h3> <p>Clears the overriden Geolocation Position and Error.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.clearGeolocationOverride Page.clearGeolocationOverride(); </pre> </div> <div id='Page_setDeviceOrientationOverride' class='command'> <h3>Page.setDeviceOrientationOverride <span class='label label-success'>Command</span></h3> <p>Overrides the Device Orientation.</p> <dl> <dt>alpha</dt> <dd>Number <span class='text'>Mock alpha</span></dd> <dt>beta</dt> <dd>Number <span class='text'>Mock beta</span></dd> <dt>gamma</dt> <dd>Number <span class='text'>Mock gamma</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.setDeviceOrientationOverride Page.setDeviceOrientationOverride(alpha, beta, gamma); </pre> </div> <div id='Page_clearDeviceOrientationOverride' class='command'> <h3>Page.clearDeviceOrientationOverride <span class='label label-success'>Command</span></h3> <p>Clears the overridden Device Orientation.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.clearDeviceOrientationOverride Page.clearDeviceOrientationOverride(); </pre> </div> <div id='Page_setTouchEmulationEnabled' class='command'> <h3>Page.setTouchEmulationEnabled <span class='label label-success'>Command</span></h3> <p>Toggles mouse event-based touch event emulation.</p> <dl> <dt>enabled</dt> <dd>Boolean <span class='text'>Whether the touch event emulation should be enabled.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.setTouchEmulationEnabled Page.setTouchEmulationEnabled(enabled); </pre> </div> <div id='Page_setEmulatedMedia' class='command'> <h3>Page.setEmulatedMedia <span class='label label-success'>Command</span></h3> <p>Emulates the given media for CSS media queries.</p> <dl> <dt>media</dt> <dd>String <span class='text'>Media type to emulate. Empty string disables the override.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.setEmulatedMedia Page.setEmulatedMedia(media); </pre> </div> <div id='Page_captureScreenshot' class='command'> <h3>Page.captureScreenshot <span class='label label-success'>Command</span></h3> <p>Capture page screenshot.</p> <dl> <dt>format (optional)</dt> <dd>( jpeg | png ) <span class='text'>Image compression format.</span></dd> <dt>quality (optional)</dt> <dd>Integer <span class='text'>Compression quality from range [0..100].</span></dd> <dt>maxWidth (optional)</dt> <dd>Integer <span class='text'>Maximum screenshot width.</span></dd> <dt>maxHeight (optional)</dt> <dd>Integer <span class='text'>Maximum screenshot height.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>data</dt> <dd>String <span class='text'>Base64-encoded image data (PNG).</span></dd> <dt>deviceScaleFactor</dt> <dd>Number <span class='text'>Device scale factor.</span></dd> <dt>pageScaleFactor</dt> <dd>Number <span class='text'>Page scale factor.</span></dd> <dt>viewport</dt> <dd><a href='#DOM.Rect'>DOM.Rect</a> <span class='text'>Viewport in CSS pixels.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.captureScreenshot Page.captureScreenshot(format, quality, maxWidth, maxHeight, function callback(res) { // res = {data, deviceScaleFactor, pageScaleFactor, viewport} }); </pre> </div> <div id='Page_startScreencast' class='command'> <h3>Page.startScreencast <span class='label label-success'>Command</span></h3> <p>Starts sending each frame using the <code>screencastFrame</code> event.</p> <dl> <dt>format (optional)</dt> <dd>( jpeg | png ) <span class='text'>Image compression format.</span></dd> <dt>quality (optional)</dt> <dd>Integer <span class='text'>Compression quality from range [0..100].</span></dd> <dt>maxWidth (optional)</dt> <dd>Integer <span class='text'>Maximum screenshot width.</span></dd> <dt>maxHeight (optional)</dt> <dd>Integer <span class='text'>Maximum screenshot height.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.startScreencast Page.startScreencast(format, quality, maxWidth, maxHeight); </pre> </div> <div id='Page_stopScreencast' class='command'> <h3>Page.stopScreencast <span class='label label-success'>Command</span></h3> <p>Stops sending each frame in the <code>screencastFrame</code>.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.stopScreencast Page.stopScreencast(); </pre> </div> <div id='Page_handleJavaScriptDialog' class='command'> <h3>Page.handleJavaScriptDialog <span class='label label-success'>Command</span></h3> <p>Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).</p> <dl> <dt>accept</dt> <dd>Boolean <span class='text'>Whether to accept or dismiss the dialog.</span></dd> <dt>promptText (optional)</dt> <dd>String <span class='text'>The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.handleJavaScriptDialog Page.handleJavaScriptDialog(accept, promptText); </pre> </div> <div id='Page_setShowViewportSizeOnResize' class='command'> <h3>Page.setShowViewportSizeOnResize <span class='label label-success'>Command</span></h3> <p>Paints viewport size upon main frame resize.</p> <dl> <dt>show</dt> <dd>Boolean <span class='text'>Whether to paint size or not.</span></dd> <dt>showGrid (optional)</dt> <dd>Boolean <span class='text'>Whether to paint grid as well.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.setShowViewportSizeOnResize Page.setShowViewportSizeOnResize(show, showGrid); </pre> </div> <div id='Page_setForceCompositingMode' class='command'> <h3>Page.setForceCompositingMode <span class='label label-success'>Command</span></h3> <p>Force accelerated compositing mode for inspected page.</p> <dl> <dt>force</dt> <dd>Boolean <span class='text'>Whether to force accelerated compositing or not.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Page.setForceCompositingMode Page.setForceCompositingMode(force); </pre> </div> <div id='Page_domContentEventFired' class='command'> <h3>Page.domContentEventFired <span class='label label-info'>Event</span></h3> <dl> <dt>timestamp</dt> <dd>Number</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Page.domContentEventFired function onDomContentEventFired(res) { // res = {timestamp} } </pre> </div> <div id='Page_loadEventFired' class='command'> <h3>Page.loadEventFired <span class='label label-info'>Event</span></h3> <dl> <dt>timestamp</dt> <dd>Number</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Page.loadEventFired function onLoadEventFired(res) { // res = {timestamp} } </pre> </div> <div id='Page_frameAttached' class='command'> <h3>Page.frameAttached <span class='label label-info'>Event</span></h3> <p>Fired when frame has been attached to its parent.</p> <dl> <dt>frameId</dt> <dd><a href='#Page.FrameId'>Page.FrameId</a> <span class='text'>Id of the frame that has been attached.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Page.frameAttached function onFrameAttached(res) { // res = {frameId} } </pre> </div> <div id='Page_frameNavigated' class='command'> <h3>Page.frameNavigated <span class='label label-info'>Event</span></h3> <p>Fired once navigation of the frame has completed. Frame is now associated with the new loader.</p> <dl> <dt>frame</dt> <dd><a href='#Page.Frame'>Page.Frame</a> <span class='text'>Frame object.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Page.frameNavigated function onFrameNavigated(res) { // res = {frame} } </pre> </div> <div id='Page_frameDetached' class='command'> <h3>Page.frameDetached <span class='label label-info'>Event</span></h3> <p>Fired when frame has been detached from its parent.</p> <dl> <dt>frameId</dt> <dd><a href='#Page.FrameId'>Page.FrameId</a> <span class='text'>Id of the frame that has been detached.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Page.frameDetached function onFrameDetached(res) { // res = {frameId} } </pre> </div> <div id='Page_frameStartedLoading' class='command'> <h3>Page.frameStartedLoading <span class='label label-info'>Event</span></h3> <p>Fired when frame has started loading.</p> <dl> <dt>frameId</dt> <dd><a href='#Page.FrameId'>Page.FrameId</a> <span class='text'>Id of the frame that has started loading.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Page.frameStartedLoading function onFrameStartedLoading(res) { // res = {frameId} } </pre> </div> <div id='Page_frameStoppedLoading' class='command'> <h3>Page.frameStoppedLoading <span class='label label-info'>Event</span></h3> <p>Fired when frame has stopped loading.</p> <dl> <dt>frameId</dt> <dd><a href='#Page.FrameId'>Page.FrameId</a> <span class='text'>Id of the frame that has stopped loading.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Page.frameStoppedLoading function onFrameStoppedLoading(res) { // res = {frameId} } </pre> </div> <div id='Page_frameScheduledNavigation' class='command'> <h3>Page.frameScheduledNavigation <span class='label label-info'>Event</span></h3> <p>Fired when frame schedules a potential navigation.</p> <dl> <dt>frameId</dt> <dd><a href='#Page.FrameId'>Page.FrameId</a> <span class='text'>Id of the frame that has scheduled a navigation.</span></dd> <dt>delay</dt> <dd>Number <span class='text'>Delay (in seconds) until the navigation is scheduled to begin. The navigation is not guaranteed to start.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Page.frameScheduledNavigation function onFrameScheduledNavigation(res) { // res = {frameId, delay} } </pre> </div> <div id='Page_frameClearedScheduledNavigation' class='command'> <h3>Page.frameClearedScheduledNavigation <span class='label label-info'>Event</span></h3> <p>Fired when frame no longer has a scheduled navigation.</p> <dl> <dt>frameId</dt> <dd><a href='#Page.FrameId'>Page.FrameId</a> <span class='text'>Id of the frame that has cleared its scheduled navigation.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Page.frameClearedScheduledNavigation function onFrameClearedScheduledNavigation(res) { // res = {frameId} } </pre> </div> <div id='Page_javascriptDialogOpening' class='command'> <h3>Page.javascriptDialogOpening <span class='label label-info'>Event</span></h3> <p>Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.</p> <dl> <dt>message</dt> <dd>String <span class='text'>Message that will be displayed by the dialog.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Page.javascriptDialogOpening function onJavascriptDialogOpening(res) { // res = {message} } </pre> </div> <div id='Page_javascriptDialogClosed' class='command'> <h3>Page.javascriptDialogClosed <span class='label label-info'>Event</span></h3> <p>Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.</p> <h4>Code Example:</h4> <pre> // WebInspector Event: Page.javascriptDialogClosed function onJavascriptDialogClosed(res) { // res = {} } </pre> </div> <div id='Page_scriptsEnabled' class='command'> <h3>Page.scriptsEnabled <span class='label label-info'>Event</span></h3> <p>Fired when the JavaScript is enabled/disabled on the page</p> <dl> <dt>isEnabled</dt> <dd>Boolean <span class='text'>Whether script execution is enabled or disabled on the page.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Page.scriptsEnabled function onScriptsEnabled(res) { // res = {isEnabled} } </pre> </div> <div id='Page_screencastFrame' class='command'> <h3>Page.screencastFrame <span class='label label-info'>Event</span></h3> <p>Compressed image data requested by the <code>startScreencast</code>.</p> <dl> <dt>data</dt> <dd>String <span class='text'>Base64-encoded compressed image.</span></dd> <dt>deviceScaleFactor (optional)</dt> <dd>Number <span class='text'>Device scale factor.</span></dd> <dt>pageScaleFactor (optional)</dt> <dd>Number <span class='text'>Page scale factor.</span></dd> <dt>viewport (optional)</dt> <dd><a href='#DOM.Rect'>DOM.Rect</a> <span class='text'>Viewport in CSS pixels.</span></dd> <dt>offsetTop (optional)</dt> <dd>Number <span class='text'>Top offset in DIP.</span></dd> <dt>offsetBottom (optional)</dt> <dd>Number <span class='text'>Bottom offset in DIP.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Page.screencastFrame function onScreencastFrame(res) { // res = {data, deviceScaleFactor, pageScaleFactor, viewport, offsetTop, offsetBottom} } </pre> </div> <div id='Page_screencastVisibilityChanged' class='command'> <h3>Page.screencastVisibilityChanged <span class='label label-info'>Event</span></h3> <p>Fired when the page with currently enabled screencast was shown or hidden </code>.</p> <dl> <dt>visible</dt> <dd>Boolean <span class='text'>True if the page is visible.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Page.screencastVisibilityChanged function onScreencastVisibilityChanged(res) { // res = {visible} } </pre> </div> </section> <section id='Profiler' class='domain'> <h1>Profiler</h1> <p></p> <span class='label'>Type</span> <ul> <li><a href='#Profiler.ProfileHeader'>Profiler.ProfileHeader</a>: Profile header.</li> <li><a href='#Profiler.CPUProfileNode'>Profiler.CPUProfileNode</a>: CPU Profile node. Holds callsite information, execution statistics and child nodes.</li> <li><a href='#Profiler.CPUProfile'>Profiler.CPUProfile</a>: Profile.</li> <li><a href='#Profiler.HeapSnapshotObjectId'>Profiler.HeapSnapshotObjectId</a>: Heap snashot object id.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#Profiler.enable'>Profiler.enable</a></li> <li><a href='#Profiler.disable'>Profiler.disable</a></li> <li><a href='#Profiler.setSamplingInterval'>Profiler.setSamplingInterval</a>: Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.</li> <li><a href='#Profiler.start'>Profiler.start</a></li> <li><a href='#Profiler.stop'>Profiler.stop</a></li> <li><a href='#Profiler.getProfileHeaders'>Profiler.getProfileHeaders</a></li> <li><a href='#Profiler.getCPUProfile'>Profiler.getCPUProfile</a></li> <li><a href='#Profiler.removeProfile'>Profiler.removeProfile</a></li> <li><a href='#Profiler.clearProfiles'>Profiler.clearProfiles</a></li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#Profiler.addProfileHeader'>Profiler.addProfileHeader</a></li> <li><a href='#Profiler.setRecordingProfile'>Profiler.setRecordingProfile</a></li> <li><a href='#Profiler.resetProfiles'>Profiler.resetProfiles</a></li> </ul> <div id='Profiler_ProfileHeader' class='type'> <h3>Profiler.ProfileHeader <span class='label'>Type</span></h3> <p>Profile header.</p> <dl> <dt>title</dt> <dd>String <span class='text'>Profile title.</span></dd> <dt>uid</dt> <dd>Integer <span class='text'>Unique identifier of the profile.</span></dd> </dl> </div> <div id='Profiler_CPUProfileNode' class='type'> <h3>Profiler.CPUProfileNode <span class='label'>Type</span></h3> <p>CPU Profile node. Holds callsite information, execution statistics and child nodes.</p> <dl> <dt>functionName</dt> <dd>String <span class='text'>Function name.</span></dd> <dt>scriptId</dt> <dd><a href='#Debugger.ScriptId'>Debugger.ScriptId</a> <span class='text'>Script identifier.</span></dd> <dt>url</dt> <dd>String <span class='text'>URL.</span></dd> <dt>lineNumber</dt> <dd>Integer <span class='text'>Line number.</span></dd> <dt>hitCount</dt> <dd>Integer <span class='text'>Number of samples where this node was on top of the call stack.</span></dd> <dt>callUID</dt> <dd>Number <span class='text'>Call UID.</span></dd> <dt>children</dt> <dd>[<a href='#Profiler.CPUProfileNode'>Profiler.CPUProfileNode</a>] <span class='text'>Child nodes.</span></dd> <dt>deoptReason</dt> <dd>String <span class='text'>The reason of being not optimized. The function may be deoptimized or marked as don't optimize.</span></dd> <dt>id (optional)</dt> <dd>Integer <span class='text'>Unique id of the node.</span></dd> </dl> </div> <div id='Profiler_CPUProfile' class='type'> <h3>Profiler.CPUProfile <span class='label'>Type</span></h3> <p>Profile.</p> <dl> <dt>head</dt> <dd><a href='#Profiler.CPUProfileNode'>Profiler.CPUProfileNode</a></dd> <dt>startTime</dt> <dd>Number <span class='text'>Profiling start time in seconds.</span></dd> <dt>endTime</dt> <dd>Number <span class='text'>Profiling end time in seconds.</span></dd> <dt>samples (optional)</dt> <dd>[Integer] <span class='text'>Ids of samples top nodes.</span></dd> </dl> </div> <div id='Profiler_HeapSnapshotObjectId' class='type'> <h3>Profiler.HeapSnapshotObjectId <span class='label'>Type</span></h3> <p>Heap snashot object id.</p> <dl> <dd>String</dd> </dl> </div> <div id='Profiler_enable' class='command'> <h3>Profiler.enable <span class='label label-success'>Command</span></h3> <h4>Code Example:</h4> <pre> // WebInspector Command: Profiler.enable Profiler.enable(); </pre> </div> <div id='Profiler_disable' class='command'> <h3>Profiler.disable <span class='label label-success'>Command</span></h3> <h4>Code Example:</h4> <pre> // WebInspector Command: Profiler.disable Profiler.disable(); </pre> </div> <div id='Profiler_setSamplingInterval' class='command'> <h3>Profiler.setSamplingInterval <span class='label label-success'>Command</span></h3> <p>Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.</p> <dl> <dt>interval</dt> <dd>Integer <span class='text'>New sampling interval in microseconds.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Profiler.setSamplingInterval Profiler.setSamplingInterval(interval); </pre> </div> <div id='Profiler_start' class='command'> <h3>Profiler.start <span class='label label-success'>Command</span></h3> <h4>Code Example:</h4> <pre> // WebInspector Command: Profiler.start Profiler.start(); </pre> </div> <div id='Profiler_stop' class='command'> <h3>Profiler.stop <span class='label label-success'>Command</span></h3> <h4>Callback Parameters:</h4> <dl> <dt>header</dt> <dd><a href='#Profiler.ProfileHeader'>Profiler.ProfileHeader</a> <span class='text'>The header of the recorded profile.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Profiler.stop Profiler.stop(function callback(res) { // res = {header} }); </pre> </div> <div id='Profiler_getProfileHeaders' class='command'> <h3>Profiler.getProfileHeaders <span class='label label-success'>Command</span></h3> <h4>Callback Parameters:</h4> <dl> <dt>headers</dt> <dd>[<a href='#Profiler.ProfileHeader'>Profiler.ProfileHeader</a>]</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Profiler.getProfileHeaders Profiler.getProfileHeaders(function callback(res) { // res = {headers} }); </pre> </div> <div id='Profiler_getCPUProfile' class='command'> <h3>Profiler.getCPUProfile <span class='label label-success'>Command</span></h3> <dl> <dt>uid</dt> <dd>Integer</dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>profile</dt> <dd><a href='#Profiler.CPUProfile'>Profiler.CPUProfile</a></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Profiler.getCPUProfile Profiler.getCPUProfile(uid, function callback(res) { // res = {profile} }); </pre> </div> <div id='Profiler_removeProfile' class='command'> <h3>Profiler.removeProfile <span class='label label-success'>Command</span></h3> <dl> <dt>type</dt> <dd>String</dd> <dt>uid</dt> <dd>Integer</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Profiler.removeProfile Profiler.removeProfile(type, uid); </pre> </div> <div id='Profiler_clearProfiles' class='command'> <h3>Profiler.clearProfiles <span class='label label-success'>Command</span></h3> <h4>Code Example:</h4> <pre> // WebInspector Command: Profiler.clearProfiles Profiler.clearProfiles(); </pre> </div> <div id='Profiler_addProfileHeader' class='command'> <h3>Profiler.addProfileHeader <span class='label label-info'>Event</span></h3> <dl> <dt>header</dt> <dd><a href='#Profiler.ProfileHeader'>Profiler.ProfileHeader</a></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Profiler.addProfileHeader function onAddProfileHeader(res) { // res = {header} } </pre> </div> <div id='Profiler_setRecordingProfile' class='command'> <h3>Profiler.setRecordingProfile <span class='label label-info'>Event</span></h3> <dl> <dt>isProfiling</dt> <dd>Boolean</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Profiler.setRecordingProfile function onSetRecordingProfile(res) { // res = {isProfiling} } </pre> </div> <div id='Profiler_resetProfiles' class='command'> <h3>Profiler.resetProfiles <span class='label label-info'>Event</span></h3> <h4>Code Example:</h4> <pre> // WebInspector Event: Profiler.resetProfiles function onResetProfiles(res) { // res = {} } </pre> </div> </section> <section id='Runtime' class='domain'> <h1>Runtime</h1> <p>Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects. Evaluation results are returned as mirror object that expose object type, string representation and unique identifier that can be used for further object reference. Original objects are maintained in memory unless they are either explicitly released or are released along with the other objects in their object group.</p> <span class='label'>Type</span> <ul> <li><a href='#Runtime.RemoteObjectId'>Runtime.RemoteObjectId</a>: Unique object identifier.</li> <li><a href='#Runtime.RemoteObject'>Runtime.RemoteObject</a>: Mirror object referencing original JavaScript object.</li> <li><a href='#Runtime.ObjectPreview'>Runtime.ObjectPreview</a>: Object containing abbreviated remote object value.</li> <li><a href='#Runtime.PropertyPreview'>Runtime.PropertyPreview</a></li> <li><a href='#Runtime.PropertyDescriptor'>Runtime.PropertyDescriptor</a>: Object property descriptor.</li> <li><a href='#Runtime.InternalPropertyDescriptor'>Runtime.InternalPropertyDescriptor</a>: Object internal property descriptor. This property isn't normally visible in JavaScript code.</li> <li><a href='#Runtime.CallArgument'>Runtime.CallArgument</a>: Represents function call argument. Either remote object id objectId or primitive value or neither of (for undefined) them should be specified.</li> <li><a href='#Runtime.ExecutionContextId'>Runtime.ExecutionContextId</a>: Id of an execution context.</li> <li><a href='#Runtime.ExecutionContextDescription'>Runtime.ExecutionContextDescription</a>: Description of an isolated world.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#Runtime.evaluate'>Runtime.evaluate</a>: Evaluates expression on global object.</li> <li><a href='#Runtime.callFunctionOn'>Runtime.callFunctionOn</a>: Calls function with given declaration on the given object. Object group of the result is inherited from the target object.</li> <li><a href='#Runtime.getProperties'>Runtime.getProperties</a>: Returns properties of a given object. Object group of the result is inherited from the target object.</li> <li><a href='#Runtime.releaseObject'>Runtime.releaseObject</a>: Releases remote object with given id.</li> <li><a href='#Runtime.releaseObjectGroup'>Runtime.releaseObjectGroup</a>: Releases all remote objects that belong to a given group.</li> <li><a href='#Runtime.run'>Runtime.run</a>: Tells inspected instance(worker or page) that it can run in case it was started paused.</li> <li><a href='#Runtime.enable'>Runtime.enable</a>: Enables reporting of execution contexts creation by means of executionContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing execution context.</li> <li><a href='#Runtime.disable'>Runtime.disable</a>: Disables reporting of execution contexts creation.</li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#Runtime.executionContextCreated'>Runtime.executionContextCreated</a>: Issued when new execution context is created.</li> </ul> <div id='Runtime_RemoteObjectId' class='type'> <h3>Runtime.RemoteObjectId <span class='label'>Type</span></h3> <p>Unique object identifier.</p> <dl> <dd>String</dd> </dl> </div> <div id='Runtime_RemoteObject' class='type'> <h3>Runtime.RemoteObject <span class='label'>Type</span></h3> <p>Mirror object referencing original JavaScript object.</p> <dl> <dt>type</dt> <dd>( object | function | undefined | string | number | boolean ) <span class='text'>Object type.</span></dd> <dt>subtype (optional)</dt> <dd>( array | null | node | regexp | date ) <span class='text'>Object subtype hint. Specified for <code>object</code> type values only.</span></dd> <dt>className (optional)</dt> <dd>String <span class='text'>Object class (constructor) name. Specified for <code>object</code> type values only.</span></dd> <dt>value (optional)</dt> <dd>Any <span class='text'>Remote object value (in case of primitive values or JSON values if it was requested).</span></dd> <dt>description (optional)</dt> <dd>String <span class='text'>String representation of the object.</span></dd> <dt>objectId (optional)</dt> <dd><a href='#Runtime.RemoteObjectId'>Runtime.RemoteObjectId</a> <span class='text'>Unique object identifier (for non-primitive values).</span></dd> <dt>preview (optional)</dt> <dd><a href='#Runtime.ObjectPreview'>Runtime.ObjectPreview</a> <span class='text'>Preview containing abbreviated property values.</span></dd> </dl> </div> <div id='Runtime_ObjectPreview' class='type'> <h3>Runtime.ObjectPreview <span class='label'>Type</span></h3> <p>Object containing abbreviated remote object value.</p> <dl> <dt>lossless</dt> <dd>Boolean <span class='text'>Determines whether preview is lossless (contains all information of the original object).</span></dd> <dt>overflow</dt> <dd>Boolean <span class='text'>True iff some of the properties of the original did not fit.</span></dd> <dt>properties</dt> <dd>[<a href='#Runtime.PropertyPreview'>Runtime.PropertyPreview</a>] <span class='text'>List of the properties.</span></dd> </dl> </div> <div id='Runtime_PropertyPreview' class='type'> <h3>Runtime.PropertyPreview <span class='label'>Type</span></h3> <dl> <dt>name</dt> <dd>String <span class='text'>Property name.</span></dd> <dt>type</dt> <dd>( object | function | undefined | string | number | boolean ) <span class='text'>Object type.</span></dd> <dt>value (optional)</dt> <dd>String <span class='text'>User-friendly property value string.</span></dd> <dt>valuePreview (optional)</dt> <dd><a href='#Runtime.ObjectPreview'>Runtime.ObjectPreview</a> <span class='text'>Nested value preview.</span></dd> <dt>subtype (optional)</dt> <dd>( array | null | node | regexp | date ) <span class='text'>Object subtype hint. Specified for <code>object</code> type values only.</span></dd> </dl> </div> <div id='Runtime_PropertyDescriptor' class='type'> <h3>Runtime.PropertyDescriptor <span class='label'>Type</span></h3> <p>Object property descriptor.</p> <dl> <dt>name</dt> <dd>String <span class='text'>Property name.</span></dd> <dt>value (optional)</dt> <dd><a href='#Runtime.RemoteObject'>Runtime.RemoteObject</a> <span class='text'>The value associated with the property.</span></dd> <dt>writable (optional)</dt> <dd>Boolean <span class='text'>True if the value associated with the property may be changed (data descriptors only).</span></dd> <dt>get (optional)</dt> <dd><a href='#Runtime.RemoteObject'>Runtime.RemoteObject</a> <span class='text'>A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only).</span></dd> <dt>set (optional)</dt> <dd><a href='#Runtime.RemoteObject'>Runtime.RemoteObject</a> <span class='text'>A function which serves as a setter for the property, or <code>undefined</code> if there is no setter (accessor descriptors only).</span></dd> <dt>configurable</dt> <dd>Boolean <span class='text'>True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object.</span></dd> <dt>enumerable</dt> <dd>Boolean <span class='text'>True if this property shows up during enumeration of the properties on the corresponding object.</span></dd> <dt>wasThrown (optional)</dt> <dd>Boolean <span class='text'>True if the result was thrown during the evaluation.</span></dd> <dt>isOwn (optional)</dt> <dd>Boolean <span class='text'>True if the property is owned for the object.</span></dd> </dl> </div> <div id='Runtime_InternalPropertyDescriptor' class='type'> <h3>Runtime.InternalPropertyDescriptor <span class='label'>Type</span></h3> <p>Object internal property descriptor. This property isn't normally visible in JavaScript code.</p> <dl> <dt>name</dt> <dd>String <span class='text'>Conventional property name.</span></dd> <dt>value (optional)</dt> <dd><a href='#Runtime.RemoteObject'>Runtime.RemoteObject</a> <span class='text'>The value associated with the property.</span></dd> </dl> </div> <div id='Runtime_CallArgument' class='type'> <h3>Runtime.CallArgument <span class='label'>Type</span></h3> <p>Represents function call argument. Either remote object id <code>objectId</code> or primitive <code>value</code> or neither of (for undefined) them should be specified.</p> <dl> <dt>value (optional)</dt> <dd>Any <span class='text'>Primitive value.</span></dd> <dt>objectId (optional)</dt> <dd><a href='#Runtime.RemoteObjectId'>Runtime.RemoteObjectId</a> <span class='text'>Remote object handle.</span></dd> </dl> </div> <div id='Runtime_ExecutionContextId' class='type'> <h3>Runtime.ExecutionContextId <span class='label'>Type</span></h3> <p>Id of an execution context.</p> <dl> <dd>Integer</dd> </dl> </div> <div id='Runtime_ExecutionContextDescription' class='type'> <h3>Runtime.ExecutionContextDescription <span class='label'>Type</span></h3> <p>Description of an isolated world.</p> <dl> <dt>id</dt> <dd><a href='#Runtime.ExecutionContextId'>Runtime.ExecutionContextId</a> <span class='text'>Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed.</span></dd> <dt>isPageContext</dt> <dd>Boolean <span class='text'>True if this is a context where inspected web page scripts run. False if it is a content script isolated context.</span></dd> <dt>name</dt> <dd>String <span class='text'>Human readable name describing given context.</span></dd> <dt>frameId</dt> <dd><a href='#Page.FrameId'>Page.FrameId</a> <span class='text'>Id of the owning frame.</span></dd> </dl> </div> <div id='Runtime_evaluate' class='command'> <h3>Runtime.evaluate <span class='label label-success'>Command</span></h3> <p>Evaluates expression on global object.</p> <dl> <dt>expression</dt> <dd>String <span class='text'>Expression to evaluate.</span></dd> <dt>objectGroup (optional)</dt> <dd>String <span class='text'>Symbolic group name that can be used to release multiple objects.</span></dd> <dt>includeCommandLineAPI (optional)</dt> <dd>Boolean <span class='text'>Determines whether Command Line API should be available during the evaluation.</span></dd> <dt>doNotPauseOnExceptionsAndMuteConsole (optional)</dt> <dd>Boolean <span class='text'>Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state.</span></dd> <dt>contextId (optional)</dt> <dd><a href='#Runtime.ExecutionContextId'>Runtime.ExecutionContextId</a> <span class='text'>Specifies in which isolated context to perform evaluation. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page.</span></dd> <dt>returnByValue (optional)</dt> <dd>Boolean <span class='text'>Whether the result is expected to be a JSON object that should be sent by value.</span></dd> <dt>generatePreview (optional)</dt> <dd>Boolean <span class='text'>Whether preview should be generated for the result.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>result</dt> <dd><a href='#Runtime.RemoteObject'>Runtime.RemoteObject</a> <span class='text'>Evaluation result.</span></dd> <dt>wasThrown (optional)</dt> <dd>Boolean <span class='text'>True if the result was thrown during the evaluation.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Runtime.evaluate Runtime.evaluate(expression, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, contextId, returnByValue, generatePreview, function callback(res) { // res = {result, wasThrown} }); </pre> </div> <div id='Runtime_callFunctionOn' class='command'> <h3>Runtime.callFunctionOn <span class='label label-success'>Command</span></h3> <p>Calls function with given declaration on the given object. Object group of the result is inherited from the target object.</p> <dl> <dt>objectId</dt> <dd><a href='#Runtime.RemoteObjectId'>Runtime.RemoteObjectId</a> <span class='text'>Identifier of the object to call function on.</span></dd> <dt>functionDeclaration</dt> <dd>String <span class='text'>Declaration of the function to call.</span></dd> <dt>arguments (optional)</dt> <dd>[<a href='#Runtime.CallArgument'>Runtime.CallArgument</a>] <span class='text'>Call arguments. All call arguments must belong to the same JavaScript world as the target object.</span></dd> <dt>doNotPauseOnExceptionsAndMuteConsole (optional)</dt> <dd>Boolean <span class='text'>Specifies whether function call should stop on exceptions and mute console. Overrides setPauseOnException state.</span></dd> <dt>returnByValue (optional)</dt> <dd>Boolean <span class='text'>Whether the result is expected to be a JSON object which should be sent by value.</span></dd> <dt>generatePreview (optional)</dt> <dd>Boolean <span class='text'>Whether preview should be generated for the result.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>result</dt> <dd><a href='#Runtime.RemoteObject'>Runtime.RemoteObject</a> <span class='text'>Call result.</span></dd> <dt>wasThrown (optional)</dt> <dd>Boolean <span class='text'>True if the result was thrown during the evaluation.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Runtime.callFunctionOn Runtime.callFunctionOn(objectId, functionDeclaration, arguments, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, function callback(res) { // res = {result, wasThrown} }); </pre> </div> <div id='Runtime_getProperties' class='command'> <h3>Runtime.getProperties <span class='label label-success'>Command</span></h3> <p>Returns properties of a given object. Object group of the result is inherited from the target object.</p> <dl> <dt>objectId</dt> <dd><a href='#Runtime.RemoteObjectId'>Runtime.RemoteObjectId</a> <span class='text'>Identifier of the object to return properties for.</span></dd> <dt>ownProperties (optional)</dt> <dd>Boolean <span class='text'>If true, returns properties belonging only to the element itself, not to its prototype chain.</span></dd> <dt>accessorPropertiesOnly (optional)</dt> <dd>Boolean <span class='text'>If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.</span></dd> </dl> <h4>Callback Parameters:</h4> <dl> <dt>result</dt> <dd>[<a href='#Runtime.PropertyDescriptor'>Runtime.PropertyDescriptor</a>] <span class='text'>Object properties.</span></dd> <dt>internalProperties (optional)</dt> <dd>[<a href='#Runtime.InternalPropertyDescriptor'>Runtime.InternalPropertyDescriptor</a>] <span class='text'>Internal object properties (only of the element itself).</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Runtime.getProperties Runtime.getProperties(objectId, ownProperties, accessorPropertiesOnly, function callback(res) { // res = {result, internalProperties} }); </pre> </div> <div id='Runtime_releaseObject' class='command'> <h3>Runtime.releaseObject <span class='label label-success'>Command</span></h3> <p>Releases remote object with given id.</p> <dl> <dt>objectId</dt> <dd><a href='#Runtime.RemoteObjectId'>Runtime.RemoteObjectId</a> <span class='text'>Identifier of the object to release.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Runtime.releaseObject Runtime.releaseObject(objectId); </pre> </div> <div id='Runtime_releaseObjectGroup' class='command'> <h3>Runtime.releaseObjectGroup <span class='label label-success'>Command</span></h3> <p>Releases all remote objects that belong to a given group.</p> <dl> <dt>objectGroup</dt> <dd>String <span class='text'>Symbolic object group name.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Runtime.releaseObjectGroup Runtime.releaseObjectGroup(objectGroup); </pre> </div> <div id='Runtime_run' class='command'> <h3>Runtime.run <span class='label label-success'>Command</span></h3> <p>Tells inspected instance(worker or page) that it can run in case it was started paused.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Runtime.run Runtime.run(); </pre> </div> <div id='Runtime_enable' class='command'> <h3>Runtime.enable <span class='label label-success'>Command</span></h3> <p>Enables reporting of execution contexts creation by means of <code>executionContextCreated</code> event. When the reporting gets enabled the event will be sent immediately for each existing execution context.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Runtime.enable Runtime.enable(); </pre> </div> <div id='Runtime_disable' class='command'> <h3>Runtime.disable <span class='label label-success'>Command</span></h3> <p>Disables reporting of execution contexts creation.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Runtime.disable Runtime.disable(); </pre> </div> <div id='Runtime_executionContextCreated' class='command'> <h3>Runtime.executionContextCreated <span class='label label-info'>Event</span></h3> <p>Issued when new execution context is created.</p> <dl> <dt>context</dt> <dd><a href='#Runtime.ExecutionContextDescription'>Runtime.ExecutionContextDescription</a> <span class='text'>A newly created execution contex.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Runtime.executionContextCreated function onExecutionContextCreated(res) { // res = {context} } </pre> </div> </section> <section id='Timeline' class='domain'> <h1>Timeline</h1> <p>Timeline provides its clients with instrumentation records that are generated during the page runtime. Timeline instrumentation can be started and stopped using corresponding commands. While timeline is started, it is generating timeline event records.</p> <span class='label'>Type</span> <ul> <li><a href='#Timeline.DOMCounters'>Timeline.DOMCounters</a>: Current values of DOM counters.</li> <li><a href='#Timeline.TimelineEvent'>Timeline.TimelineEvent</a>: Timeline record contains information about the recorded activity.</li> </ul> <span class='label label-success'>Command</span> <ul> <li><a href='#Timeline.enable'>Timeline.enable</a>: Enables timeline. After this call, timeline can be started from within the page (for example upon console.timeline).</li> <li><a href='#Timeline.disable'>Timeline.disable</a>: Disables timeline.</li> <li><a href='#Timeline.start'>Timeline.start</a>: Starts capturing instrumentation events.</li> <li><a href='#Timeline.stop'>Timeline.stop</a>: Stops capturing instrumentation events.</li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#Timeline.eventRecorded'>Timeline.eventRecorded</a>: Fired for every instrumentation event while timeline is started.</li> <li><a href='#Timeline.started'>Timeline.started</a>: Fired when timeline is started.</li> <li><a href='#Timeline.stopped'>Timeline.stopped</a>: Fired when timeline is stopped.</li> </ul> <div id='Timeline_DOMCounters' class='type'> <h3>Timeline.DOMCounters <span class='label'>Type</span></h3> <p>Current values of DOM counters.</p> <dl> <dt>documents</dt> <dd>Integer</dd> <dt>nodes</dt> <dd>Integer</dd> <dt>jsEventListeners</dt> <dd>Integer</dd> </dl> </div> <div id='Timeline_TimelineEvent' class='type'> <h3>Timeline.TimelineEvent <span class='label'>Type</span></h3> <p>Timeline record contains information about the recorded activity.</p> <dl> <dt>type</dt> <dd>String <span class='text'>Event type.</span></dd> <dt>thread (optional)</dt> <dd>String <span class='text'>If present, identifies the thread that produced the event.</span></dd> <dt>data</dt> <dd>Object <span class='text'>Event data.</span></dd> <dt>children (optional)</dt> <dd>[<a href='#Timeline.TimelineEvent'>Timeline.TimelineEvent</a>] <span class='text'>Nested records.</span></dd> <dt>counters (optional)</dt> <dd><a href='#Timeline.DOMCounters'>Timeline.DOMCounters</a> <span class='text'>Current values of DOM counters.</span></dd> <dt>usedHeapSize (optional)</dt> <dd>Integer <span class='text'>Current size of JS heap.</span></dd> <dt>nativeHeapStatistics (optional)</dt> <dd>Object <span class='text'>Native heap statistics.</span></dd> </dl> </div> <div id='Timeline_enable' class='command'> <h3>Timeline.enable <span class='label label-success'>Command</span></h3> <p>Enables timeline. After this call, timeline can be started from within the page (for example upon console.timeline).</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Timeline.enable Timeline.enable(); </pre> </div> <div id='Timeline_disable' class='command'> <h3>Timeline.disable <span class='label label-success'>Command</span></h3> <p>Disables timeline.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Timeline.disable Timeline.disable(); </pre> </div> <div id='Timeline_start' class='command'> <h3>Timeline.start <span class='label label-success'>Command</span></h3> <p>Starts capturing instrumentation events.</p> <dl> <dt>maxCallStackDepth (optional)</dt> <dd>Integer <span class='text'>Samples JavaScript stack traces up to <code>maxCallStackDepth</code>, defaults to 5.</span></dd> <dt>bufferEvents (optional)</dt> <dd>Boolean <span class='text'>Whether instrumentation events should be buffered and returned upon <code>stop</code> call.</span></dd> <dt>includeDomCounters (optional)</dt> <dd>Boolean <span class='text'>Whether DOM counters data should be included into timeline events.</span></dd> <dt>includeNativeMemoryStatistics (optional)</dt> <dd>Boolean <span class='text'>Whether native memory usage statistics should be reported as part of timeline events.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Timeline.start Timeline.start(maxCallStackDepth, bufferEvents, includeDomCounters, includeNativeMemoryStatistics); </pre> </div> <div id='Timeline_stop' class='command'> <h3>Timeline.stop <span class='label label-success'>Command</span></h3> <p>Stops capturing instrumentation events.</p> <h4>Callback Parameters:</h4> <dl> <dt>events (optional)</dt> <dd>[<a href='#Timeline.TimelineEvent'>Timeline.TimelineEvent</a>] <span class='text'>Timeline event record data.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Timeline.stop Timeline.stop(function callback(res) { // res = {events} }); </pre> </div> <div id='Timeline_eventRecorded' class='command'> <h3>Timeline.eventRecorded <span class='label label-info'>Event</span></h3> <p>Fired for every instrumentation event while timeline is started.</p> <dl> <dt>record</dt> <dd><a href='#Timeline.TimelineEvent'>Timeline.TimelineEvent</a> <span class='text'>Timeline event record data.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Timeline.eventRecorded function onEventRecorded(res) { // res = {record} } </pre> </div> <div id='Timeline_started' class='command'> <h3>Timeline.started <span class='label label-info'>Event</span></h3> <p>Fired when timeline is started.</p> <dl> <dt>consoleTimeline (optional)</dt> <dd>Boolean <span class='text'>If specified, identifies that timeline was started using console.timeline() call.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Timeline.started function onStarted(res) { // res = {consoleTimeline} } </pre> </div> <div id='Timeline_stopped' class='command'> <h3>Timeline.stopped <span class='label label-info'>Event</span></h3> <p>Fired when timeline is stopped.</p> <dl> <dt>consoleTimeline (optional)</dt> <dd>Boolean <span class='text'>If specified, identifies that timeline was started using console.timeline() call.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Timeline.stopped function onStopped(res) { // res = {consoleTimeline} } </pre> </div> </section> <section id='Tracing' class='domain'> <h1>Tracing</h1> <p></p> <span class='label label-success'>Command</span> <ul> <li><a href='#Tracing.start'>Tracing.start</a>: Strart trace events collection.</li> <li><a href='#Tracing.end'>Tracing.end</a>: Stop trace events collection.</li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#Tracing.dataCollected'>Tracing.dataCollected</a></li> <li><a href='#Tracing.tracingComplete'>Tracing.tracingComplete</a></li> </ul> <div id='Tracing_start' class='command'> <h3>Tracing.start <span class='label label-success'>Command</span></h3> <p>Strart trace events collection.</p> <dl> <dt>categories</dt> <dd>String <span class='text'>Category/tag filter</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Tracing.start Tracing.start(categories); </pre> </div> <div id='Tracing_end' class='command'> <h3>Tracing.end <span class='label label-success'>Command</span></h3> <p>Stop trace events collection.</p> <h4>Code Example:</h4> <pre> // WebInspector Command: Tracing.end Tracing.end(); </pre> </div> <div id='Tracing_dataCollected' class='command'> <h3>Tracing.dataCollected <span class='label label-info'>Event</span></h3> <dl> <dt>value</dt> <dd>[Object]</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Tracing.dataCollected function onDataCollected(res) { // res = {value} } </pre> </div> <div id='Tracing_tracingComplete' class='command'> <h3>Tracing.tracingComplete <span class='label label-info'>Event</span></h3> <h4>Code Example:</h4> <pre> // WebInspector Event: Tracing.tracingComplete function onTracingComplete(res) { // res = {} } </pre> </div> </section> <section id='Worker' class='domain'> <h1>Worker</h1> <p></p> <span class='label label-success'>Command</span> <ul> <li><a href='#Worker.enable'>Worker.enable</a></li> <li><a href='#Worker.disable'>Worker.disable</a></li> <li><a href='#Worker.sendMessageToWorker'>Worker.sendMessageToWorker</a></li> <li><a href='#Worker.canInspectWorkers'>Worker.canInspectWorkers</a>: Tells whether browser supports workers inspection.</li> <li><a href='#Worker.connectToWorker'>Worker.connectToWorker</a></li> <li><a href='#Worker.disconnectFromWorker'>Worker.disconnectFromWorker</a></li> <li><a href='#Worker.setAutoconnectToWorkers'>Worker.setAutoconnectToWorkers</a></li> </ul> <span class='label label-info'>Event</span> <ul> <li><a href='#Worker.workerCreated'>Worker.workerCreated</a></li> <li><a href='#Worker.workerTerminated'>Worker.workerTerminated</a></li> <li><a href='#Worker.dispatchMessageFromWorker'>Worker.dispatchMessageFromWorker</a></li> <li><a href='#Worker.disconnectedFromWorker'>Worker.disconnectedFromWorker</a></li> </ul> <div id='Worker_enable' class='command'> <h3>Worker.enable <span class='label label-success'>Command</span></h3> <h4>Code Example:</h4> <pre> // WebInspector Command: Worker.enable Worker.enable(); </pre> </div> <div id='Worker_disable' class='command'> <h3>Worker.disable <span class='label label-success'>Command</span></h3> <h4>Code Example:</h4> <pre> // WebInspector Command: Worker.disable Worker.disable(); </pre> </div> <div id='Worker_sendMessageToWorker' class='command'> <h3>Worker.sendMessageToWorker <span class='label label-success'>Command</span></h3> <dl> <dt>workerId</dt> <dd>Integer</dd> <dt>message</dt> <dd>Object</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Worker.sendMessageToWorker Worker.sendMessageToWorker(workerId, message); </pre> </div> <div id='Worker_canInspectWorkers' class='command'> <h3>Worker.canInspectWorkers <span class='label label-success'>Command</span></h3> <p>Tells whether browser supports workers inspection.</p> <h4>Callback Parameters:</h4> <dl> <dt>result</dt> <dd>Boolean <span class='text'>True if browser has workers support.</span></dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Worker.canInspectWorkers Worker.canInspectWorkers(function callback(res) { // res = {result} }); </pre> </div> <div id='Worker_connectToWorker' class='command'> <h3>Worker.connectToWorker <span class='label label-success'>Command</span></h3> <dl> <dt>workerId</dt> <dd>Integer</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Worker.connectToWorker Worker.connectToWorker(workerId); </pre> </div> <div id='Worker_disconnectFromWorker' class='command'> <h3>Worker.disconnectFromWorker <span class='label label-success'>Command</span></h3> <dl> <dt>workerId</dt> <dd>Integer</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Worker.disconnectFromWorker Worker.disconnectFromWorker(workerId); </pre> </div> <div id='Worker_setAutoconnectToWorkers' class='command'> <h3>Worker.setAutoconnectToWorkers <span class='label label-success'>Command</span></h3> <dl> <dt>value</dt> <dd>Boolean</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Command: Worker.setAutoconnectToWorkers Worker.setAutoconnectToWorkers(value); </pre> </div> <div id='Worker_workerCreated' class='command'> <h3>Worker.workerCreated <span class='label label-info'>Event</span></h3> <dl> <dt>workerId</dt> <dd>Integer</dd> <dt>url</dt> <dd>String</dd> <dt>inspectorConnected</dt> <dd>Boolean</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Worker.workerCreated function onWorkerCreated(res) { // res = {workerId, url, inspectorConnected} } </pre> </div> <div id='Worker_workerTerminated' class='command'> <h3>Worker.workerTerminated <span class='label label-info'>Event</span></h3> <dl> <dt>workerId</dt> <dd>Integer</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Worker.workerTerminated function onWorkerTerminated(res) { // res = {workerId} } </pre> </div> <div id='Worker_dispatchMessageFromWorker' class='command'> <h3>Worker.dispatchMessageFromWorker <span class='label label-info'>Event</span></h3> <dl> <dt>workerId</dt> <dd>Integer</dd> <dt>message</dt> <dd>Object</dd> </dl> <h4>Code Example:</h4> <pre> // WebInspector Event: Worker.dispatchMessageFromWorker function onDispatchMessageFromWorker(res) { // res = {workerId, message} } </pre> </div> <div id='Worker_disconnectedFromWorker' class='command'> <h3>Worker.disconnectedFromWorker <span class='label label-info'>Event</span></h3> <h4>Code Example:</h4> <pre> // WebInspector Event: Worker.disconnectedFromWorker function onDisconnectedFromWorker(res) { // res = {} } </pre> </div> </section> </div> <footer> <p>Generated from Inspector.json v1.1 on 2014-12-08 11:14:07-0800</p> <p>Implementation by <a href='mailto:jdiehl@adobe.com'>Jonathan Diehl</a></p> </footer> </body> </html>