Central data types and how they work:
A "runtime" represents a document context in which threads execute. There is a one-to-one mapping between runtimes and HTML documents.
A "thread" represents a thread of execution in a runtime. A "parent" thread can be preempted by another "child" thread in order to respond to a priority event; the parent thread will not run again until the child thread has finished.
A "script" is a pair (id, source code) where the id is globally unique and the source code is Unicode text.
An "object" is represented by a globally unique ID that is assigned by the debugger.
Globally unique means unique within a running Opera session; that is from starting Opera to stopping it.
The windowID is shared across scope. Notably, it's the same as in the console logger and window manager INTERNAL: The value is from Window::id
AddBreakpoint
command AddBreakpoint(Breakpoint)
{
-
required uint32 breakpointID = 1;
A nonzero ID chosen by the client.
-
required uint32 scriptID = 2;
ID of script where the breakpoint should be set.
-
required uint32 lineNumber = 3;
Line number to break on in script.
}
returns (Default)
{
}
= 6;
AddEventBreakpoint
command AddEventBreakpoint(EventBreakpoint)
{
-
required uint32 breakpointID = 1;
A nonzero ID chosen by the client.
-
required string eventType = 2;
The name of the event to break on.
-
optional uint32 windowID = 3 [default = 0];
If specified the event will only break in this specific window.
}
returns (Default)
{
}
= 38;
AddEventHandler
Add an event handler. This will generate a OnHandleEvent event every time the XML event defined by the pair (namespace, eventType) reaches the object defined by objectID in the capturing phase. XML events are defined in http://www.w3.org/TR/xml-events
command AddEventHandler(EventHandler)
{
-
Add an event handler. This will generate a HANDLE-EVENT event every time the XML event defined by the pair (NAMESPACE, EVENT-TYPE) reaches the object defined by OBJECT-ID in the capturing phase. XML events are defined in http://www.w3.org/TR/xml-events
-
required uint32 handlerID = 1;
A nonzero ID chosen by the client. The host may also use this ID to refer to the event handler.
-
required uint32 objectID = 2;
-
required string namespace = 3;
Namespace of the event. If empty, it will match any namespace.
-
required string eventType = 4;
-
required bool preventDefaultHandler = 5;
If true it prevents the default event handler from running.
-
required bool stopPropagation = 6;
If true it stops propagation of the event beyond this objectID (it will however run for all handlers on the object).
}
returns (Default)
{
}
= 8;
Break
command Break(BreakSelection)
returns (Default)
{
}
= 12;
ContinueThread
command ContinueThread(ThreadMode)
{
-
required uint32 runtimeID = 1;
-
required uint32 threadID = 2;
-
required string mode = 3;
One of:
- "run"
- "step-into-call"
- "step-next-line"
- "step-out-of-call"
}
returns (Default)
{
}
= 2;
CssGetAllStylesheets
command CssGetAllStylesheets(RuntimeID)
returns (CssStylesheetList)
{
}
= 23;
CssGetIndexMap
command CssGetIndexMap(Default)
{
}
returns (CssIndexMap)
= 22;
CssGetStyleDeclarations
command CssGetStyleDeclarations(CssElementSelection)
{
-
required uint32 runtimeID = 1;
-
required uint32 objectID = 2;
-
repeated PseudoSelector pseudoSelectorList = 3;
Set this field to match rules with the specified pseudo selectors, even if that rule is not currently applied.
The rule will match if either of the specified pseudo classes or pseudo elements are used in the selector. Order does not matter.
This is handy for inspecting and modifying style rules for non-current element states.
LINK and VISISTED are not supported for elements that are not links.
Using this field will not alter the state of the element. Selecting HOVER, for instance, when an element is currently not hovered will therefore not apply the HOVER style rules.
Added in version 6.5
{
-
Represents pseudo-classes and pseudo-elements.
-
NONE = 0;
-
HOVER = 1;
-
ACTIVE = 2;
-
FOCUS = 3;
-
LINK = 4;
-
VISITED = 5;
-
FIRST_LINE = 6;
-
FIRST_LETTER = 7;
-
BEFORE = 8;
-
AFTER = 9;
-
SELECTION = 10;
}
-
-
optional PseudoSelector pseudoElement = 4;
If this field is set, select the specified pseudo-element as the target for inspection.
The field (if set) may only contain pseudo-elements, not pseudo-classes. Attemting to use a pseudo-class will cause an error. This field may not be used with the 'pseudoSelectorList' field, as pseudo-elements do not have their own states (hovered, visited, etc).
Added in version 6.9
{
-
Represents pseudo-classes and pseudo-elements.
-
NONE = 0;
-
HOVER = 1;
-
ACTIVE = 2;
-
FOCUS = 3;
-
LINK = 4;
-
VISITED = 5;
-
FIRST_LINE = 6;
-
FIRST_LETTER = 7;
-
BEFORE = 8;
-
AFTER = 9;
-
SELECTION = 10;
}
-
}
returns (CssStyleDeclarations)
{
-
repeated string computedStyleList = 1;
-
repeated NodeStyle nodeStyleList = 2;
{
-
required uint32 objectID = 1;
-
required string elementName = 2;
-
repeated StyleDeclaration styleList = 3;
{
-
Common to all origins:
- indexList
- valueList
- priorityList
- statusList
Common to AUTHOR and LOCAL
- selector
- specificity
For AUTHOR
- stylesheetID
- ruleID
- ruleType
For SVG
- specificity
-
required RuleOrigin origin = 1;
{
-
Indicates where a rule originated from.
Added in version 6.5
-
USER_AGENT = 1;
This means that the user-agent provided this rule, i.e. the rule is part of the default style.
-
LOCAL = 2;
This means the rule originated from a local CSS file specified by the user, i.e. User CSS.
-
AUTHOR = 3;
Author rules originate from stylesheets either in separate files, or inline in the document.
-
ELEMENT = 4;
The rule originated from a 'style' attribute on the HTML element.
-
SVG = 5;
The rule is the CSS-equivalent of SVG presentational attributes.
Added in version 6.5
}
-
-
repeated uint32 indexList = 2;
-
repeated string valueList = 3;
-
repeated bool priorityList = 4;
-
repeated DeclarationStatus statusList = 5;
-
optional string selector = 6;
-
optional uint32 specificity = 7;
-
optional uint32 stylesheetID = 8;
-
optional uint32 ruleID = 9;
-
optional uint32 ruleType = 10;
-
optional uint32 lineNumber = 11;
The original, stylesheet relative line number of this rule. The line number refers to the start of the declaration block.
This field may be set for STYLE rules, but as the information depends on an optional feature in Opera, some builds intended for low-memory devices may not support this.
Added in version 6.6
-
repeated bool fullscreenList = 12;
For USER_AGENT, an entry in this list is true if the declaration is from a rule for :fullscreen or :fullscreen-ancestor where the rule ends up in between author and author important in the cascade. (See: http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html#rendering).
Added in version 6.12
}
-
-
optional PseudoSelector pseudoElement = 4;
If set, the style declarations apply to the specified pseudo-element of the node represented by objectID.
This field (if set) will contain pseudo-elements only (not pseudo- classes).
Added in version 6.9
{
-
Represents pseudo-classes and pseudo-elements.
-
NONE = 0;
-
HOVER = 1;
-
ACTIVE = 2;
-
FOCUS = 3;
-
LINK = 4;
-
VISITED = 5;
-
FIRST_LINE = 6;
-
FIRST_LETTER = 7;
-
BEFORE = 8;
-
AFTER = 9;
-
SELECTION = 10;
}
-
}
-
}
= 25;
CssGetStylesheet
command CssGetStylesheet(CssStylesheetSelection)
returns (CssStylesheetRules)
{
-
repeated StylesheetRule ruleList = 1;
{
-
Common to FONT_FACE, PAGE and STYLE is:
- indexList
- valueList
- priorityList
Common to STYLE and PAGE is:
- selectorList
- specificityList
Common to MEDIA and IMPORT
- mediaList
For MEDIA
- ruleList
For IMPORT
- href
- importStylesheetID
For PAGE
- pseudoClass
For CHARSET
- charset
-
required uint32 type = 1;
Type values: 0 - UNKNOWN 1 - STYLE 2 - CHARSET 3 - IMPORT 4 - MEDIA 5 - FONT_FACE 6 - PAGE 7 - NAMESPACE // Not supported
-
required uint32 stylesheetID = 2;
-
required uint32 ruleID = 3;
-
repeated uint32 indexList = 4;
-
repeated string valueList = 5;
-
repeated bool priorityList = 6;
-
repeated string selectorList = 7;
0..1 for PAGE and 0..* for STYLE
-
repeated uint32 specificityList = 8;
1..1 for PAGE and 0..* for STYLE
-
repeated string mediaList = 9;
-
repeated StylesheetRule ruleList = 10;
-
optional string href = 11;
-
optional uint32 importStylesheetID = 12;
-
optional uint32 pseudoClass = 13;
-
optional string charset = 14;
-
optional uint32 lineNumber = 15;
The original, stylesheet relative line number of this rule. The line number refers to the start of the declaration block.
This field may be set for STYLE rules, but as the information depends on an optional feature in Opera, some builds intended for low-memory devices may not support this.
Added in version 6.6
}
-
}
= 24;
Eval
command Eval(EvalData)
{
-
required uint32 runtimeID = 1;
-
required uint32 threadID = 2;
The ID of the thread to use for executing the script data, or 0 to use the global scope.
-
required uint32 frameIndex = 3;
-
required string scriptData = 4;
Represents a script to be executed.
-
repeated Variable variableList = 5;
Represent variables to set.
-
optional bool wantDebugging = 6 [default = false];
Enable debugging of current script eval. Defaults to false.
Added in version 6.3
}
returns (EvalResult)
{
-
required string status = 1;
If it is "completed" or "unhandled-exception" then type, value and objectValue will be present.
-
required string type = 2;
One of:
- "number"
- "boolean"
- "string"
- "null"
- "undefined"
- "object"
-
optional string value = 3;
Only present when type is "number", "string" or "boolean"
-
optional ObjectValue objectValue = 4;
Only present when type is "object"
{
-
required uint32 objectID = 1;
-
required bool isCallable = 2;
-
required string type = 3;
type, function or object
-
optional uint32 prototypeID = 4;
-
optional string className = 5;
The class of the object.
-
optional string functionName = 6;
If the object is a function, this is the name of the variable associated with that function (if any).
}
-
}
= 3;
ExamineObjects
command ExamineObjects(ExamineList)
{
-
required uint32 runtimeID = 1;
-
repeated uint32 objectList = 2;
-
optional bool examinePrototypes = 3;
-
optional bool skipNonenumerables = 4;
-
optional bool filterProperties = 5;
}
returns (ObjectChainList)
{
-
repeated ObjectList objectChainList = 1;
{
-
repeated ObjectInfo objectList = 1;
{
-
required ObjectValue value = 1;
{
-
required uint32 objectID = 1;
-
required bool isCallable = 2;
-
required string type = 3;
type, function or object
-
optional uint32 prototypeID = 4;
-
optional string className = 5;
The class of the object.
-
optional string functionName = 6;
If the object is a function, this is the name of the variable associated with that function (if any).
}
-
-
repeated Property propertyList = 2;
{
-
If type is ... then ... is present: "object", objectValue "number", value "string", value "boolean", value ("true" or "false") Otherwise ("undefined" or "null"), only type is present.
-
required string name = 1;
-
required string type = 2;
One of:
- "number"
- "boolean"
- "string"
- "null"
- "undefined"
- "object"
- "script_getter" Added in version 6.7, value is undefined. The property has to be fetched by eval.
- "function_caller_or_argument" Added in version 6.7, value is undefined. The property is a function argument or function caller.
-
optional string value = 3;
Only present for "number", "string" or "boolean"
-
optional ObjectValue objectValue = 4;
Only present for "object"
{
-
required uint32 objectID = 1;
-
required bool isCallable = 2;
-
required string type = 3;
type, function or object
-
optional uint32 prototypeID = 4;
-
optional string className = 5;
The class of the object.
-
optional string functionName = 6;
If the object is a function, this is the name of the variable associated with that function (if any).
}
-
}
-
}
-
}
-
}
= 4;
GetBacktrace
command GetBacktrace(BacktraceSelection)
{
-
required uint32 runtimeID = 1;
-
required uint32 threadID = 2;
-
optional uint32 maxFrames = 3 [default = 0];
If omitted (or 0) all frames are returned.
}
returns (BacktraceFrameList)
{
-
Frames are in innermost-first order.
-
repeated BacktraceFrame frameList = 1;
{
-
required uint32 functionID = 1;
-
required uint32 argumentObject = 2;
-
required uint32 variableObject = 3;
-
required uint32 thisObject = 4;
-
optional ObjectValue objectValue = 5;
TODO: Spec says repeated, while the code only assumes one (required)
{
-
required uint32 objectID = 1;
-
required bool isCallable = 2;
-
required string type = 3;
type, function or object
-
optional uint32 prototypeID = 4;
-
optional string className = 5;
The class of the object.
-
optional string functionName = 6;
If the object is a function, this is the name of the variable associated with that function (if any).
}
-
-
optional uint32 scriptID = 6;
-
optional uint32 lineNumber = 7;
-
repeated uint32 scopeList = 8;
The variable objects in the scope chain of the function. The first element in the list is the innermost scope (the scope of the function itself). The list includes the global scope.
Added in version 6.1
-
optional ObjectValue argumentValue = 9;
The full value of the 'arguments' object.
Added in version 6.2
{
-
required uint32 objectID = 1;
-
required bool isCallable = 2;
-
required string type = 3;
type, function or object
-
optional uint32 prototypeID = 4;
-
optional string className = 5;
The class of the object.
-
optional string functionName = 6;
If the object is a function, this is the name of the variable associated with that function (if any).
}
-
-
optional ObjectValue thisValue = 10;
The full value of the 'this' object.
Added in version 6.2
{
-
required uint32 objectID = 1;
-
required bool isCallable = 2;
-
required string type = 3;
type, function or object
-
optional uint32 prototypeID = 4;
-
optional string className = 5;
The class of the object.
-
optional string functionName = 6;
If the object is a function, this is the name of the variable associated with that function (if any).
}
-
}
-
-
repeated ReturnValue returnValueList = 2;
The list of return values that were returned from the most recent function calls. List is cleared upon calling a function. Most recently returned value is first in the list.
Added in version 6.10
{
-
The object representing return value of a function. Includes context information indicating where from and where to the value was returned (script id, line number), returned value and function object itself that returned the value.
Added in version 6.10
-
required Value value = 1;
The value that was returned.
{
-
Represents an ECMAScript value, a value is either one of the primitives like string or boolean or an object.
-
optional Type type = 1;
The type of value.
Booleans are encoded as either TRUE or FALSE to shorten the number fields in use.
{
-
UNDEFINED = 0;
The undefined type, returned when no value was found or "undefined" was referenced.
-
NULL = 1;
A null value.
-
TRUE = 2;
Boolean value true.
-
FALSE = 3;
Boolean value false.
-
NAN = 4;
NaN value which cannot be exported to JSON directly. Should be treated like a number.
ECMAScript users should use this code to get the value natively::
parseFloat("NaN") -
PLUS_INFINITY = 5;
Plus infinity value which cannot be export to JSON directly. Should be treated like a number.
ECMAScript users should use this code to get the value natively::
parseFloat("Infinity") -
MINUS_INFINITY = 6;
Minus infinity value which cannot be export to JSON directly. Should be treated like a number.
ECMAScript users should use this code to get the value natively::
parseFloat("-Infinity") -
NUMBER = 7;
A number, use the field 'number' for the actual value.
-
STRING = 8;
A string, use the field 'str' for the actual string data.
-
OBJECT = 9;
An object, the field 'object' contains object details.
}
-
-
optional double number = 2;
The numeric value, set if type = NUMBER.
-
optional string str = 3;
The string, set if type = STRING.
-
optional ObjectValue object = 4;
Object information, set if type = OBJECT.
{
-
required uint32 objectID = 1;
-
required bool isCallable = 2;
-
required string type = 3;
type, function or object
-
optional uint32 prototypeID = 4;
-
optional string className = 5;
The class of the object.
-
optional string functionName = 6;
If the object is a function, this is the name of the variable associated with that function (if any).
}
-
}
-
-
required ObjectValue functionFrom = 4;
The function object from which the value was returned.
{
-
required uint32 objectID = 1;
-
required bool isCallable = 2;
-
required string type = 3;
type, function or object
-
optional uint32 prototypeID = 4;
-
optional string className = 5;
The class of the object.
-
optional string functionName = 6;
If the object is a function, this is the name of the variable associated with that function (if any).
}
-
-
required Position positionFrom = 2;
The position where the value was returned from.
{
-
Defines the position in a script. The position is identified by the ID of the script and the line number in the script.
-
required uint32 scriptID = 1;
ID of the script which contains the position. The ID will be set in the ScriptInfo message when a new script appears.
-
required uint32 lineNumber = 2;
The line number in the script.
}
-
-
required Position positionTo = 3;
The position where the value was returned to.
{
-
Defines the position in a script. The position is identified by the ID of the script and the line number in the script.
-
required uint32 scriptID = 1;
ID of the script which contains the position. The ID will be set in the ScriptInfo message when a new script appears.
-
required uint32 lineNumber = 2;
The line number in the script.
}
-
}
-
}
= 11;
GetEventListeners
Returns the event listeners found on the specified objects. It examines each object specified and checks if it has the EventTarget DOM interface, if so it fetches the list of event listeners (if any). http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget
Each object will always be present in the response even if listeners could not be extracted. This ensures that the response list matches the request.
Added in version 6.11
command GetEventListeners(GetEventListenersArg)
{
-
Arguments for the GetEventListeners command.
Added in version 6.11
-
required uint32 runtimeID = 1;
-
repeated uint32 objectList = 2;
List of object IDs to fetch event listeners from, the object must have implemented the EventTarget DOM interface to be able to get the registered listeners, otherwise the event listener will be unset in the response.
}
returns (EventTargets)
{
-
Contains a list of event targets and their event listeners.
Added in version 6.11
-
required uint32 runtimeID = 1;
-
repeated EventTarget targetList = 2;
List of event targets that was fetched. The list will also contain event targets for objects that does not implement the EventTarget DOM interface but the listener list will be unset.
{
-
Represents the EventTarget DOM interface found on DOM nodes and objects. This message will also be used for objects that does not support EventTarget, in those cases only the objectID will be set.
Details on the EventTarget interface: http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget
Added in version 6.11
-
required uint32 objectID = 1;
The ID of the object which has the event target.
-
repeated EventListener eventListenerList = 2;
List of event listeners registered on this event target. If the object does not implement the EventTarget DOM interface then the field will not be set.
{
-
Defines a DOM event listener which will be called when a matching DOM event is triggered. The listener is registered on a DOM Node for a given event type, e.g. "click", either by calling EventTarget.addEventListener() or by setting an attribute e.g. onclick="...". Use the field origin to determine where it was registered.
The origin dictates which fields are set in this message.
If origin.type is EVENT_TARGET then the following fields are set:
- useCapture
- listenerObjectID
- position
If origin.type is ATTRIBUTE then the following fields are set:
- listenerObjectID or listenerScriptData
Added in version 6.11
-
required string eventType = 1;
The event type which the listener triggers on e.g., "click", "mousemove" More examples at http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html
-
required Origin origin = 2;
Determines the origin of the registration.
{
-
Defines possible origins for the registration of the event listener.
-
EVENT_TARGET = 1;
The listener was created by calling EventTarget.addEventListener().
-
ATTRIBUTE = 2;
The listener was created from an attribute, e.g. onclick="alert()"
}
-
-
optional Position position = 3;
Contains the script ID and line number in the script where the listener was registered. This is only set when a script registered the listener with EventTarget.addEventListener().
{
-
Defines the position in a script. The position is identified by the ID of the script and the line number in the script.
-
required uint32 scriptID = 1;
ID of the script which contains the position. The ID will be set in the ScriptInfo message when a new script appears.
-
required uint32 lineNumber = 2;
The line number in the script.
}
-
-
optional bool useCapture = 4;
The value of the useCapture parameter sent to addEventListener(). Only set when origin is EVENT_TARGET.
-
optional uint32 listenerObjectID = 5;
The function object which was registered as the EventListener. This is either set by calling EventTarget.addEventListener() or by setting an attribute on a node, e.g. node.onclick=handleClick.
-
optional string listenerScriptData = 6;
The script data which will be used as the EventListener. This is only set for attribute based listeners e.g. <div onclick="..." /> or node.onclick="...". When the listener is triggered by an event the script is compiled into a function and listenerObjectID will be set and this field unset.
}
-
}
-
}
= 46;
GetEventNames
Inspects all DOM nodes in the document and retrives the event-names for the event listeners. Only unique event-names are returned.
Added in version 6.11
command GetEventNames(GetEventNamesArg)
returns (EventNames)
{
-
Contains a list of unique event-names found in the DOM document.
Added in version 6.11
-
required uint32 runtimeID = 1;
The runtime ID where the inspection was performed.
-
required uint32 objectID = 2;
ID of the root node which was used as a starting point.
-
repeated string eventNameList = 3;
The unique list of event-names which were found in the document. e.g. ["click", "load", "blur"]
}
= 45;
GetFunctionPositions
Extracts the script position of each function object in objectList. If the list contains objects which are not functions or are native functions the position will not be reported.
Added in version 6.11
command GetFunctionPositions(GetFunctionPositionsArg)
{
-
Added in version 6.11
-
required uint32 runtimeID = 1;
-
repeated uint32 objectList = 2;
List of object IDs to fetch position for, the object must be a non-native function for the position to be fetched.
}
returns (FunctionPositionList)
{
-
Contains the result of fetching the script positions for the specified function objects.
Added in version 6.11
-
repeated FunctionPosition functionPositionList = 1;
A list of function positions. The number of items in the list corresponds to the number of object IDs sent in GetFunctionPositions.
{
-
Contains the object ID of the function and the script position if it was found.
-
required uint32 objectID = 1;
The object ID of the function which was specified in the input.
-
optional Position position = 2;
The position of a function object if available, typically native functions or objects which are not functions will not have a position set. The position contains the ID of the script and the line number in the script where it was defined.
{
-
Defines the position in a script. The position is identified by the ID of the script and the line number in the script.
-
required uint32 scriptID = 1;
ID of the script which contains the position. The ID will be set in the ScriptInfo message when a new script appears.
-
required uint32 lineNumber = 2;
The line number in the script.
}
-
}
-
}
= 44;
GetSelectedObject
command GetSelectedObject(Default)
{
}
returns (ObjectSelection)
= 26;
InspectDom
command InspectDom(DomTraversal)
{
-
required uint32 objectID = 1;
-
required string traversal = 2;
traversal on off:
- "parent-node-chain-with-children" take the parent node chain for the target node. add for each node in that chain all children, and for all children there first child, if that is a text node and the only node, starting with the document node.
- "children" get node data for all children in their flow
- `"node" get node data for that node
- "subtree" get node data for the subtree in the flow of it
}
returns (NodeList)
{
-
repeated NodeInfo nodeList = 1;
{
-
required uint32 objectID = 1;
-
required NodeType type = 2;
The type for this Node.
{
-
Enumerates the possible node types as defined by DOM Level 2 Core.
The type of a node determines the additional information which may be present in the NodeInfo message. For instance NodeInfo messages for ELEMENT nodes will provide a list of attributes associated with that element (if any).
For more information about node types, see http://www.w3.org/TR/DOM-Level-2-Core/.
-
UNKNOWN = 0;
Unknown elements can appear in the the tree if a node type is used internally which is not known to Scope.
This should normally not happen, and any occurence of an UNKNOWN node type may be filed as a bug.
-
ELEMENT = 1;
An element in an HTML or XML document, e.g. <p>.
-
ATTRIBUTE = 2;
An attribute of an ELEMENT node.
-
TEXT = 3;
Textual data inside an ELEMENT or ATTRIBUTE.
-
CDATA_SECTION = 4;
Used to escape blocks of text containing characters that would otherwise be regarded as markup.
-
ENTITY_REFERENCE = 5;
A reference (usage) of an ENTITY.
-
ENTITY = 6;
A XML entity, e.g. <!ENTITY greet "Hello there">.
-
PROCESSING_INSTRUCTION = 7;
An instruction for the application using the XML, e.g.: <?xml version="1.0"?>
-
COMMENT = 8;
A comment node, e.g. <!-- Foo -->
-
DOCUMENT = 9;
The root of the document tree.
-
DOCUMENT_TYPE = 10;
A document type node, e.g.: <!doctype html>.
-
DOCUMENT_FRAGMENT = 11;
A "lightweight" DOCUMENT node. Represents a portion of a document tree.
-
NOTATION = 12;
An XML notation node declares the format of a non-markup entity to be included in the document, e.g.: <!NOTATION GIF system "image/gif">.
-
XPATH_NAMESPACE = 13;
A namespace, e.g.: <namespace:author>Asimov</namespace:author>.
-
SVG_ELEMENTINSTANCE = 14;
A node maintaned by the SVG DOM.
}
-
-
required string name = 3;
-
required uint32 depth = 4;
-
optional string namespacePrefix = 5;
Used if type is ELEMENT.
-
repeated Attribute attributeList = 6;
Used if type is ELEMENT.
-
optional uint32 childrenLength = 7;
Used if type is ELEMENT.
-
optional string value = 8;
Used if type is TEXT, CDATA_SECTION, PROCESSING_INSTRUCTION or COMMENT.
-
optional string publicID = 9;
Used if type is DOCUMENT_TYPE.
-
optional string systemID = 10;
Used if type is DOCUMENT_TYPE.
-
optional uint32 runtimeID = 11;
The runtime ID of this node. This field will always be set.
Added in version 6.5
-
optional ObjectReference contentDocument = 12;
If the node type is an ELEMENT which contains another document, (frame, iframe, or object), this field will be set with a reference to the document node contained within that element.
The field will not be set if the element does not contain a document.
Added in version 6.5
{
-
Refers to an object and its parent runtime.
-
required uint32 runtimeID = 1;
-
required uint32 objectID = 2;
}
-
-
optional ObjectReference frameElement = 13;
Like 'contentDocument', but the other direction; if this node is a DOCUMENT node, then this field will be set with a reference to the element that contains the document in the parent runtime.
The field will not be set if the document node represents a top-level document.
Added in version 6.5
{
-
Refers to an object and its parent runtime.
-
required uint32 runtimeID = 1;
-
required uint32 objectID = 2;
}
-
-
optional MatchReason matchReason = 14;
Explains why the node was included in the response. This field will always be set.
When this message is a response to DOM inspection, this field will be set to TRAVERSAL. When sent as a response to a search, it will either be set to SEARCH_HIT, or SEARCH_PARENT.
Added in version 6.5
{
-
Values in this enum explain why the node was included in the response.
-
TRAVERSAL = 1;
The node was included because we explicitly traversed the DOM (sub-)tree.
-
SEARCH_ANCESTOR = 2;
The node was included because it is an ancestor of a node hit by a search.
-
SEARCH_HIT = 3;
The node was included because it was directly hit by a search.
}
-
-
repeated PseudoElement pseudoElementList = 15;
If the node has pseudo elements applied, this list will contain those elements.
Added in version 6.5
{
-
Represents a pseudo element, such as ::after, ::before, and so forth.
Added in version 6.5
-
required Type type = 1;
-
optional string content = 2;
If a ::before or ::after rule uses the 'content' property to insert text content, this field will contain that content.
}
-
-
repeated EventListener eventListenerList = 16;
A list of event listeners registered on this node.
Added in version 6.11
{
-
Defines a DOM event listener which will be called when a matching DOM event is triggered. The listener is registered on a DOM Node for a given event type, e.g. "click", either by calling EventTarget.addEventListener() or by setting an attribute e.g. onclick="...". Use the field origin to determine where it was registered.
The origin dictates which fields are set in this message.
If origin.type is EVENT_TARGET then the following fields are set:
- useCapture
- listenerObjectID
- position
If origin.type is ATTRIBUTE then the following fields are set:
- listenerObjectID or listenerScriptData
Added in version 6.11
-
required string eventType = 1;
The event type which the listener triggers on e.g., "click", "mousemove" More examples at http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html
-
required Origin origin = 2;
Determines the origin of the registration.
{
-
Defines possible origins for the registration of the event listener.
-
EVENT_TARGET = 1;
The listener was created by calling EventTarget.addEventListener().
-
ATTRIBUTE = 2;
The listener was created from an attribute, e.g. onclick="alert()"
}
-
-
optional Position position = 3;
Contains the script ID and line number in the script where the listener was registered. This is only set when a script registered the listener with EventTarget.addEventListener().
{
-
Defines the position in a script. The position is identified by the ID of the script and the line number in the script.
-
required uint32 scriptID = 1;
ID of the script which contains the position. The ID will be set in the ScriptInfo message when a new script appears.
-
required uint32 lineNumber = 2;
The line number in the script.
}
-
-
optional bool useCapture = 4;
The value of the useCapture parameter sent to addEventListener(). Only set when origin is EVENT_TARGET.
-
optional uint32 listenerObjectID = 5;
The function object which was registered as the EventListener. This is either set by calling EventTarget.addEventListener() or by setting an attribute on a node, e.g. node.onclick=handleClick.
-
optional string listenerScriptData = 6;
The script data which will be used as the EventListener. This is only set for attribute based listeners e.g. <div onclick="..." /> or node.onclick="...". When the listener is triggered by an event the script is compiled into a function and listenerObjectID will be set and this field unset.
}
-
}
-
}
= 13;
ListRuntimes
command ListRuntimes(RuntimeSelection)
{
-
repeated uint32 runtimeList = 1;
List the ones you want to see, or none if you want all (also set allRuntimes).
-
optional bool allRuntimes = 2;
Create runtimes for all documents. Runtimes are normally not created for documents without ECMAScript.
}
returns (RuntimeList)
{
-
repeated RuntimeInfo runtimeList = 1;
{
-
required uint32 runtimeID = 1;
-
required string htmlFramePath = 2;
-
required uint32 windowID = 3;
The ID of the window this runtime is associated with, if the runtime is associated with a single window. If the runtime is associated with more (or less) than one window, the field will be set to zero. Refer to the
windowIDList
field for more information. -
required uint32 objectID = 4;
the 'global' object
-
required string uri = 5;
the document's URI
-
optional string description = 6;
A short description of the nature of the runtime, for instance "document", or "webworker".
Added in version 6.2
-
repeated uint32 windowIDList = 7;
A list of all windows this runtime is associated with. Normally, this will only contain one window, but some runtimes, for instance shared WebWorkers, can be associated with multiple (zero or more) windows.
Added in version 6.2
}
-
}
= 1;
ReleaseObjects
Release protected ECMAScript objects. This will just make them garbage collectible. Released objects are not necessarily freed immediately.
Calling ReleaseObjects with an empty list causes all objects to be released. Otherwise, only the specified objects will be released. Attempting to release a non-existent object has no effect, and will fail silently.
Releasing objects invalidates associated object IDs immediately.
command ReleaseObjects(ReleaseObjectsArg)
returns (Default)
{
}
= 29;
RemoveBreakpoint
command RemoveBreakpoint(BreakpointID)
returns (Default)
{
}
= 7;
RemoveEventHandler
command RemoveEventHandler(EventHandlerID)
returns (Default)
{
}
= 9;
SearchDom
Search the DOM of a document, using either plain text, regexp, xpath or CSS selectors.
For plain text and regular expression searches, tag names, attribute names, attribute values and text content is searched through. Regular expressions searches use the same backend as the RegExp object in ECMAScript, and therefore use the same syntax and semantics.
CSS selector or XPath searches work like their DOM counterparts (document.querySelector, and document.evaluate). For more information, see:
Whenever a matching node is found, that node is included in the command response, and marked as a search hit. The parent chain is also included for each hit; however, no parent is included twice (nor is any 'hit' included twice).
Added in version 6.5
command SearchDom(SearchDomArg)
{
-
Argument to SearchDom command.
Added in version 6.5
-
required uint32 runtimeID = 1;
Search the DOM of this runtime.
-
required string query = 2;
The string to search for.
-
optional Type type = 3 [default = PLAIN_TEXT];
{
-
PLAIN_TEXT = 1;
Search tag names, attribute names, attribute values, and text content for an ocurrence of the specified string.
The query string "strong", for instance, would match all <strong> nodes as well as text content and attribute values with "strong" in them.
-
REGEXP = 2;
Match tag names, attribute names, attribute values, and text content against a specified regular expression. Do not delimit the query string Perl-style ("/foo/"). Provide the plain regex string only ("foo").
The regular expression "[0-9]+", for instance, would match all text nodes and attribute values containing digits.
Regular expression searches use the same syntax and semantics as the RegExp object in ECMAScript.
-
XPATH = 3;
Matches nodes according to an XPath expression.
"//p", for instance, matches all <p> nodes.
-
SELECTOR = 4;
Matches nodes according to a CSS selector.
For instance, "div" matches all <div> nodes, and ".box" matches all nodes with the class "box".
-
EVENT = 5;
Matches nodes according to an event name. Any node that has an event listener which matches the event name is included. The match is partial and can match anywhere.
For instance, "focus" matches events "focus", "focusin" and "focusout". An empty string will match all event names which means all elements with listeners will be returned.
Added in version 6.11
}
-
-
optional uint32 objectID = 4;
If present, search only the subtree of this node.
-
optional bool ignoreCase = 5 [default = false];
Set to TRUE to ignore case (REGEXP and PLAIN_TEXT only). If set to FALSE, which is the default, case will be respected.
}
returns (NodeList)
{
-
repeated NodeInfo nodeList = 1;
{
-
required uint32 objectID = 1;
-
required NodeType type = 2;
The type for this Node.
{
-
Enumerates the possible node types as defined by DOM Level 2 Core.
The type of a node determines the additional information which may be present in the NodeInfo message. For instance NodeInfo messages for ELEMENT nodes will provide a list of attributes associated with that element (if any).
For more information about node types, see http://www.w3.org/TR/DOM-Level-2-Core/.
-
UNKNOWN = 0;
Unknown elements can appear in the the tree if a node type is used internally which is not known to Scope.
This should normally not happen, and any occurence of an UNKNOWN node type may be filed as a bug.
-
ELEMENT = 1;
An element in an HTML or XML document, e.g. <p>.
-
ATTRIBUTE = 2;
An attribute of an ELEMENT node.
-
TEXT = 3;
Textual data inside an ELEMENT or ATTRIBUTE.
-
CDATA_SECTION = 4;
Used to escape blocks of text containing characters that would otherwise be regarded as markup.
-
ENTITY_REFERENCE = 5;
A reference (usage) of an ENTITY.
-
ENTITY = 6;
A XML entity, e.g. <!ENTITY greet "Hello there">.
-
PROCESSING_INSTRUCTION = 7;
An instruction for the application using the XML, e.g.: <?xml version="1.0"?>
-
COMMENT = 8;
A comment node, e.g. <!-- Foo -->
-
DOCUMENT = 9;
The root of the document tree.
-
DOCUMENT_TYPE = 10;
A document type node, e.g.: <!doctype html>.
-
DOCUMENT_FRAGMENT = 11;
A "lightweight" DOCUMENT node. Represents a portion of a document tree.
-
NOTATION = 12;
An XML notation node declares the format of a non-markup entity to be included in the document, e.g.: <!NOTATION GIF system "image/gif">.
-
XPATH_NAMESPACE = 13;
A namespace, e.g.: <namespace:author>Asimov</namespace:author>.
-
SVG_ELEMENTINSTANCE = 14;
A node maintaned by the SVG DOM.
}
-
-
required string name = 3;
-
required uint32 depth = 4;
-
optional string namespacePrefix = 5;
Used if type is ELEMENT.
-
repeated Attribute attributeList = 6;
Used if type is ELEMENT.
-
optional uint32 childrenLength = 7;
Used if type is ELEMENT.
-
optional string value = 8;
Used if type is TEXT, CDATA_SECTION, PROCESSING_INSTRUCTION or COMMENT.
-
optional string publicID = 9;
Used if type is DOCUMENT_TYPE.
-
optional string systemID = 10;
Used if type is DOCUMENT_TYPE.
-
optional uint32 runtimeID = 11;
The runtime ID of this node. This field will always be set.
Added in version 6.5
-
optional ObjectReference contentDocument = 12;
If the node type is an ELEMENT which contains another document, (frame, iframe, or object), this field will be set with a reference to the document node contained within that element.
The field will not be set if the element does not contain a document.
Added in version 6.5
{
-
Refers to an object and its parent runtime.
-
required uint32 runtimeID = 1;
-
required uint32 objectID = 2;
}
-
-
optional ObjectReference frameElement = 13;
Like 'contentDocument', but the other direction; if this node is a DOCUMENT node, then this field will be set with a reference to the element that contains the document in the parent runtime.
The field will not be set if the document node represents a top-level document.
Added in version 6.5
{
-
Refers to an object and its parent runtime.
-
required uint32 runtimeID = 1;
-
required uint32 objectID = 2;
}
-
-
optional MatchReason matchReason = 14;
Explains why the node was included in the response. This field will always be set.
When this message is a response to DOM inspection, this field will be set to TRAVERSAL. When sent as a response to a search, it will either be set to SEARCH_HIT, or SEARCH_PARENT.
Added in version 6.5
{
-
Values in this enum explain why the node was included in the response.
-
TRAVERSAL = 1;
The node was included because we explicitly traversed the DOM (sub-)tree.
-
SEARCH_ANCESTOR = 2;
The node was included because it is an ancestor of a node hit by a search.
-
SEARCH_HIT = 3;
The node was included because it was directly hit by a search.
}
-
-
repeated PseudoElement pseudoElementList = 15;
If the node has pseudo elements applied, this list will contain those elements.
Added in version 6.5
{
-
Represents a pseudo element, such as ::after, ::before, and so forth.
Added in version 6.5
-
required Type type = 1;
-
optional string content = 2;
If a ::before or ::after rule uses the 'content' property to insert text content, this field will contain that content.
}
-
-
repeated EventListener eventListenerList = 16;
A list of event listeners registered on this node.
Added in version 6.11
{
-
Defines a DOM event listener which will be called when a matching DOM event is triggered. The listener is registered on a DOM Node for a given event type, e.g. "click", either by calling EventTarget.addEventListener() or by setting an attribute e.g. onclick="...". Use the field origin to determine where it was registered.
The origin dictates which fields are set in this message.
If origin.type is EVENT_TARGET then the following fields are set:
- useCapture
- listenerObjectID
- position
If origin.type is ATTRIBUTE then the following fields are set:
- listenerObjectID or listenerScriptData
Added in version 6.11
-
required string eventType = 1;
The event type which the listener triggers on e.g., "click", "mousemove" More examples at http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html
-
required Origin origin = 2;
Determines the origin of the registration.
{
-
Defines possible origins for the registration of the event listener.
-
EVENT_TARGET = 1;
The listener was created by calling EventTarget.addEventListener().
-
ATTRIBUTE = 2;
The listener was created from an attribute, e.g. onclick="alert()"
}
-
-
optional Position position = 3;
Contains the script ID and line number in the script where the listener was registered. This is only set when a script registered the listener with EventTarget.addEventListener().
{
-
Defines the position in a script. The position is identified by the ID of the script and the line number in the script.
-
required uint32 scriptID = 1;
ID of the script which contains the position. The ID will be set in the ScriptInfo message when a new script appears.
-
required uint32 lineNumber = 2;
The line number in the script.
}
-
-
optional bool useCapture = 4;
The value of the useCapture parameter sent to addEventListener(). Only set when origin is EVENT_TARGET.
-
optional uint32 listenerObjectID = 5;
The function object which was registered as the EventListener. This is either set by calling EventTarget.addEventListener() or by setting an attribute on a node, e.g. node.onclick=handleClick.
-
optional string listenerScriptData = 6;
The script data which will be used as the EventListener. This is only set for attribute based listeners e.g. <div onclick="..." /> or node.onclick="...". When the listener is triggered by an event the script is compiled into a function and listenerObjectID will be set and this field unset.
}
-
}
-
}
= 42;
SetConfiguration
command SetConfiguration(Configuration)
{
-
optional bool stopAtScript = 1 [default = true];
-
optional bool stopAtException = 2 [default = false];
-
optional bool stopAtError = 3 [default = false];
-
optional bool stopAtAbort = 4 [default = false];
-
optional bool stopAtGc = 5 [default = false];
-
optional bool stopAtDebuggerStatement = 6 [default = false];
-
optional bool reformatScriptData = 7 [default = false];
If set, the source of the scripts/eval'ed code/event-handlers will be reformatted before being parsed and compiled.
Added in version 6.13
-
optional string reformatConditionFunction = 8;
The body of the function used to determine whether code should be reformatted.
If both reformatScriptData is enabled and reformatConditionFunction set, reformatting will only be performed if provided function code evaluates to a boolean 'true' value.
The original script source is available through a scriptData variable that is accessible in the scope of the function.
Added in version 6.13
}
returns (Default)
{
}
= 10;
SetFunctionFilter
Specify which objects to get OnFunctionCallStarting and OnFunctionCallCompleted events for. If a function is called on an object with a matching class name, the events will be reported.
The default filter is empty, meaning no function calls will be reported.
Added in version 6.4
command SetFunctionFilter(FunctionFilter)
{
-
repeated string classList = 1;
Match the function call if any of the class names appear in the prototype chain of a given 'this' object.
}
returns (Default)
{
}
= 39;
SetPropertyFilter
Sets a new property filter which may hide some properties when examining an object. This is useful for excluding many 'uninteresting' properties found on built-in prototypes.
Calling this will overwrite the previous filter.
command SetPropertyFilter(SetPropertyFilterArg)
{
-
required PropertyFilter propertyFilter = 1;
{
-
Because we want different filters for different classes, a PropertyFilter consists of several ClassMasks, and one ClassMask consists of several PropertyMasks. A PropertyMask can be regarded as a 'rule' for filtering a property. If no rule is present, the property is allowed through the filter. If a matching rule is present, the property is not included.
-
repeated ClassMask classMaskList = 1;
The list of classes which should be filtered.
{
-
A ClassMask contains all the properties which should be considered for exclusion for a certain class.
-
required string className = 1;
The name of the class this filter applies to. Examples are 'Object' and 'HTMLHtmlElement'.
-
repeated PropertyMask propertyMaskList = 2;
The list of properties which could be filtered.
{
-
You can choose to filter a property based on name and, as an additional condition, type. For booleans, numbers and strings, you can also filter by value as a third additional condition.
If only 'name' is present, then a property with that name will be excluded, regardless of its value. If 'type' is also present, then the property with that name will be excluded only if its value is the specified type.
If 'type' indicates a boolean, number or string, you can assign a value in the corresponding optional field. The property will then be excluded only if the name, type and value all match.
-
required string name = 1;
-
optional uint32 type = 2;
-
optional bool boolean = 3;
-
optional uint32 number = 4;
-
optional string string = 5;
}
-
}
-
}
-
}
returns (Default)
{
}
= 30;
SpotlightObject
command SpotlightObject(SpotlightObjectSelection)
{
-
required uint32 objectID = 1;
Using 0 clears the spotlight.
-
required bool scrollIntoView = 2;
Chooses whether the given object should be scrolled into view or not.
}
returns (Default)
{
}
= 5;
SpotlightObjects
command SpotlightObjects(SpotlightSelection)
{
-
To highlight elements in the document
-
repeated SpotlightObject spotlightObjectList = 1;
{
-
The drawing order is box, reference-box-frame, box-frame, grid.
-
required uint32 objectID = 1;
-
required bool scrollIntoView = 2;
Chooses whether the given object should be scrolled into view or not.
-
repeated SpotlightBox boxList = 3;
{
-
Colors are encoded as RGBA with 8 bits for each channel. encoded_color = ( red << 24 ) + ( green << 16 ) + ( blue << 8 ) + ( alpha ) with red, green, blue and alpha in a range of 0 - 255 e.g.:
red 4278190335 green 16711935 blue 65535 yellow 4294902015 cyan 16777215 magenta 4278255615 -
required uint32 boxType = 1;
Valid values: 0: dimension 1: padding 2: border 3: margin
-
optional uint32 fillColor = 2;
-
optional uint32 frameColor = 3;
Drawn with 1px width inside the box
-
optional uint32 gridColor = 4;
Drawn with 1px width inside the box over the whole document
}
-
}
-
}
returns (Default)
{
}
= 27;
OnConsoleLog
This event occurs when the script calls one of these functions:
1. console.log 2. console.debug 3. console.info 4. console.warn 5. console.error 6. console.assert 7. console.dir 8. console.dirxml 9. console.group 10. console.groupCollapsed 11. console.groupEnded 12. console.count 13. console.tableAll the functions behave the same way; they accept any number of arguments, and sends them to the client.
The console.assert function is a special case, which outputs nothing if the first argument evaluates to true. Otherwise, it behaves like the other functions and sends its arguments to the client (including the first argument which triggered the assertion). If the assertion fails, it also throws an exception.
event OnConsoleLog returns (ConsoleLogInfo)
{
-
required uint32 runtimeID = 1;
-
required ConsoleLogType type = 2;
This fields indicates which
console.*
function was called.{
-
Represents the different types of logging functions (
console.log
,console.error
, and so forth). -
LOG = 1;
The script called
console.log(...)
. -
DEBUG = 2;
The script called
console.debug(...)
. -
INFO = 3;
The script called
console.info(...)
. -
WARN = 4;
The script called
console.warn(...)
. -
ERROR = 5;
The script called
console.error(...)
. -
ASSERT = 6;
The script called console.assert(expr, ...).
-
DIR = 7;
The script called
console.dir(object)
. -
DIRXML = 8;
The script called
console.dirxml(node)
. -
GROUP = 9;
The script called
console.group(...)
. -
GROUP_COLLAPSED = 10;
The script called
console.groupCollapsed(...)
. -
GROUP_END = 11;
The script called
console.groupEnd()
. -
COUNT = 12;
The script called
console.count([title])
. -
TABLE = 13;
The script called console.table(data, [columns]).
-
CLEAR = 14;
The script called
console.clear()
.Added in version 6.9
}
-
-
repeated Value valueList = 3;
The list of values passed to the function as arguments.
{
-
optional string value = 1;
-
optional ObjectValue objectValue = 2;
{
-
required uint32 objectID = 1;
-
required bool isCallable = 2;
-
required string type = 3;
type, function or object
-
optional uint32 prototypeID = 4;
-
optional string className = 5;
The class of the object.
-
optional string functionName = 6;
If the object is a function, this is the name of the variable associated with that function (if any).
}
-
}
-
-
optional Position position = 4;
The position the function was called.
{
-
Defines the position in a script. The position is identified by the ID of the script and the line number in the script.
-
required uint32 scriptID = 1;
ID of the script which contains the position. The ID will be set in the ScriptInfo message when a new script appears.
-
required uint32 lineNumber = 2;
The line number in the script.
}
-
}
= 32;
OnConsoleProfile
Occurs when console.profile is called in a script. Note that profiling is not yet supported. This event is just included to let the client know that the function has been called.
event OnConsoleProfile returns (ConsoleProfileInfo)
= 36;
OnConsoleProfileEnd
Occurs when console.profileEdd is called in a script. Note that profiling is not yet supported. This event is just included to let the client know that the function has been called.
event OnConsoleProfileEnd returns (ConsoleProfileEndInfo)
= 37;
OnConsoleTime
Occurs when console.time is called in the script. When this event occurs, Opera will start a timer which can be referred to by the specified title. The timer can later be stopped with console.timeEnd, which will calculate the elapsed time between the two calls.
event OnConsoleTime returns (ConsoleTimeInfo)
{
-
required uint32 runtimeID = 1;
-
required string title = 2;
Timers are identified by a string passed as the first argument to the function. For instance, console.time("MyTimer").
}
= 33;
OnConsoleTimeEnd
Occurs when console.timeEnd is called in the script. The message contains the elapsed time between the corresponding call to console.time (see OnConsoleTime).
event OnConsoleTimeEnd returns (ConsoleTimeEndInfo)
{
-
required uint32 runtimeID = 1;
-
required string title = 2;
The title of the timer. See ConsoleTimeInfo.title.
-
required uint32 elapsed = 3;
Elapsed time in microseconds.
}
= 34;
OnConsoleTrace
Occurs when console.trace is called in the script. Sends the stack trace at the position where the call was made.
event OnConsoleTrace returns (ConsoleTraceInfo)
{
-
required uint32 runtimeID = 1;
-
repeated BacktraceFrame frameList = 2;
The list of stack frames at the level console.trace was called.
{
-
required uint32 functionID = 1;
-
required uint32 argumentObject = 2;
-
required uint32 variableObject = 3;
-
required uint32 thisObject = 4;
-
optional ObjectValue objectValue = 5;
TODO: Spec says repeated, while the code only assumes one (required)
{
-
required uint32 objectID = 1;
-
required bool isCallable = 2;
-
required string type = 3;
type, function or object
-
optional uint32 prototypeID = 4;
-
optional string className = 5;
The class of the object.
-
optional string functionName = 6;
If the object is a function, this is the name of the variable associated with that function (if any).
}
-
-
optional uint32 scriptID = 6;
-
optional uint32 lineNumber = 7;
-
repeated uint32 scopeList = 8;
The variable objects in the scope chain of the function. The first element in the list is the innermost scope (the scope of the function itself). The list includes the global scope.
Added in version 6.1
-
optional ObjectValue argumentValue = 9;
The full value of the 'arguments' object.
Added in version 6.2
{
-
required uint32 objectID = 1;
-
required bool isCallable = 2;
-
required string type = 3;
type, function or object
-
optional uint32 prototypeID = 4;
-
optional string className = 5;
The class of the object.
-
optional string functionName = 6;
If the object is a function, this is the name of the variable associated with that function (if any).
}
-
-
optional ObjectValue thisValue = 10;
The full value of the 'this' object.
Added in version 6.2
{
-
required uint32 objectID = 1;
-
required bool isCallable = 2;
-
required string type = 3;
type, function or object
-
optional uint32 prototypeID = 4;
-
optional string className = 5;
The class of the object.
-
optional string functionName = 6;
If the object is a function, this is the name of the variable associated with that function (if any).
}
-
}
-
}
= 35;
OnFunctionCallCompleted
Occurs when a function call has completed.
event OnFunctionCallCompleted returns (FunctionCallCompletedInfo)
{
-
required uint32 runtimeID = 1;
Which runtime the call ocurred in.
-
required uint32 threadID = 2;
-
required double time = 3;
Milliseconds since epoch, at the time the call completed.
-
required Result result = 4;
{
-
SUCCESS = 1;
This result means that the function completed without throwing an exception.
-
EXCEPTION = 2;
The function could not return. The 'returnValue' field contains the thrown value instead of the return value.
}
-
-
optional Value returnValue = 5;
{
-
Represents an ECMAScript value, a value is either one of the primitives like string or boolean or an object.
-
optional Type type = 1;
The type of value.
Booleans are encoded as either TRUE or FALSE to shorten the number fields in use.
{
-
UNDEFINED = 0;
The undefined type, returned when no value was found or "undefined" was referenced.
-
NULL = 1;
A null value.
-
TRUE = 2;
Boolean value true.
-
FALSE = 3;
Boolean value false.
-
NAN = 4;
NaN value which cannot be exported to JSON directly. Should be treated like a number.
ECMAScript users should use this code to get the value natively::
parseFloat("NaN") -
PLUS_INFINITY = 5;
Plus infinity value which cannot be export to JSON directly. Should be treated like a number.
ECMAScript users should use this code to get the value natively::
parseFloat("Infinity") -
MINUS_INFINITY = 6;
Minus infinity value which cannot be export to JSON directly. Should be treated like a number.
ECMAScript users should use this code to get the value natively::
parseFloat("-Infinity") -
NUMBER = 7;
A number, use the field 'number' for the actual value.
-
STRING = 8;
A string, use the field 'str' for the actual string data.
-
OBJECT = 9;
An object, the field 'object' contains object details.
}
-
-
optional double number = 2;
The numeric value, set if type = NUMBER.
-
optional string str = 3;
The string, set if type = STRING.
-
optional ObjectValue object = 4;
Object information, set if type = OBJECT.
{
-
required uint32 objectID = 1;
-
required bool isCallable = 2;
-
required string type = 3;
type, function or object
-
optional uint32 prototypeID = 4;
-
optional string className = 5;
The class of the object.
-
optional string functionName = 6;
If the object is a function, this is the name of the variable associated with that function (if any).
}
-
}
-
}
= 41;
OnFunctionCallStarting
Occurs when a function call is about to be performed.
event OnFunctionCallStarting returns (FunctionCallStartingInfo)
{
-
required uint32 runtimeID = 1;
Which runtime the call ocurred in.
-
required uint32 threadID = 2;
-
required double time = 3;
Milliseconds since epoch, at the time the call started.
-
required ObjectValue thisObject = 4;
{
-
required uint32 objectID = 1;
-
required bool isCallable = 2;
-
required string type = 3;
type, function or object
-
optional uint32 prototypeID = 4;
-
optional string className = 5;
The class of the object.
-
optional string functionName = 6;
If the object is a function, this is the name of the variable associated with that function (if any).
}
-
-
required ObjectValue functionObject = 5;
{
-
required uint32 objectID = 1;
-
required bool isCallable = 2;
-
required string type = 3;
type, function or object
-
optional uint32 prototypeID = 4;
-
optional string className = 5;
The class of the object.
-
optional string functionName = 6;
If the object is a function, this is the name of the variable associated with that function (if any).
}
-
-
repeated Value argumentList = 6;
{
-
Represents an ECMAScript value, a value is either one of the primitives like string or boolean or an object.
-
optional Type type = 1;
The type of value.
Booleans are encoded as either TRUE or FALSE to shorten the number fields in use.
{
-
UNDEFINED = 0;
The undefined type, returned when no value was found or "undefined" was referenced.
-
NULL = 1;
A null value.
-
TRUE = 2;
Boolean value true.
-
FALSE = 3;
Boolean value false.
-
NAN = 4;
NaN value which cannot be exported to JSON directly. Should be treated like a number.
ECMAScript users should use this code to get the value natively::
parseFloat("NaN") -
PLUS_INFINITY = 5;
Plus infinity value which cannot be export to JSON directly. Should be treated like a number.
ECMAScript users should use this code to get the value natively::
parseFloat("Infinity") -
MINUS_INFINITY = 6;
Minus infinity value which cannot be export to JSON directly. Should be treated like a number.
ECMAScript users should use this code to get the value natively::
parseFloat("-Infinity") -
NUMBER = 7;
A number, use the field 'number' for the actual value.
-
STRING = 8;
A string, use the field 'str' for the actual string data.
-
OBJECT = 9;
An object, the field 'object' contains object details.
}
-
-
optional double number = 2;
The numeric value, set if type = NUMBER.
-
optional string str = 3;
The string, set if type = STRING.
-
optional ObjectValue object = 4;
Object information, set if type = OBJECT.
{
-
required uint32 objectID = 1;
-
required bool isCallable = 2;
-
required string type = 3;
type, function or object
-
optional uint32 prototypeID = 4;
-
optional string className = 5;
The class of the object.
-
optional string functionName = 6;
If the object is a function, this is the name of the variable associated with that function (if any).
}
-
}
-
-
optional Position position = 7;
The position where the call was made, or missing if the call did not come from a script.
{
-
Defines the position in a script. The position is identified by the ID of the script and the line number in the script.
-
required uint32 scriptID = 1;
ID of the script which contains the position. The ID will be set in the ScriptInfo message when a new script appears.
-
required uint32 lineNumber = 2;
The line number in the script.
}
-
}
= 40;
OnHandleEvent
This event is issued for XML events on the host, if a corresponding AddEventHandler has been issued earlier by the client.
event OnHandleEvent returns (DomEvent)
{
-
required uint32 objectID = 1;
Refers to the target of the event.
-
required uint32 handlerID = 2;
-
required string eventType = 3;
The event type is e.g., "click", "mousemove" More examples are at http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html Exactly which events are implemented depends on the host, and is not defined in this protocol.
}
= 20;
OnNewScript
event OnNewScript returns (ScriptInfo)
{
-
required uint32 runtimeID = 1;
-
required uint32 scriptID = 2;
-
required string scriptType = 3;
One of:
- "inline"
- "event"
- "linked"
- "timeout"
- "java"
- "generated"
- "unknown"
- "debugger-eval"
-
required string scriptData = 4;
-
optional string uri = 5;
present if scriptType is Linked
}
= 16;
OnObjectSelected
Some hosts send this event to indicate that an object was selected for debugging, e.g., if the debugger was started by right-clicking an element and clicking "inspect" in the context menu, this event will be sent right after startup. A client may safely choose to ignore this event.
event OnObjectSelected returns (ObjectSelection)
= 21;
OnParseError
event OnParseError returns (DomParseError)
{
-
required uint32 runtimeID = 1;
-
required uint32 scriptID = 2;
-
required uint32 lineNumber = 3;
-
required uint32 offset = 4;
Represents the character offset in the script where the parse error occured.
-
required string context = 5;
Describes in what context the error occured.
-
required string description = 6;
Contains the human-readable description of the parse error.
}
= 28;
OnReadyStateChanged
Sent when the ready state of a document is changed. The possible states are:
1. DOMContentLoaded: When the DOM (not inline elements) is loaded 2. Loaded: After all onload-handlers have finishedevent OnReadyStateChanged returns (ReadyStateInfo)
= 31;
OnRuntimeStarted
event OnRuntimeStarted returns (RuntimeInfo)
{
-
required uint32 runtimeID = 1;
-
required string htmlFramePath = 2;
-
required uint32 windowID = 3;
The ID of the window this runtime is associated with, if the runtime is associated with a single window. If the runtime is associated with more (or less) than one window, the field will be set to zero. Refer to the
windowIDList
field for more information. -
required uint32 objectID = 4;
the 'global' object
-
required string uri = 5;
the document's URI
-
optional string description = 6;
A short description of the nature of the runtime, for instance "document", or "webworker".
Added in version 6.2
-
repeated uint32 windowIDList = 7;
A list of all windows this runtime is associated with. Normally, this will only contain one window, but some runtimes, for instance shared WebWorkers, can be associated with multiple (zero or more) windows.
Added in version 6.2
}
= 14;
OnRuntimeStopped
event OnRuntimeStopped returns (RuntimeID)
= 15;
OnThreadFinished
event OnThreadFinished returns (ThreadResult)
{
-
required uint32 runtimeID = 1;
-
required uint32 threadID = 2;
-
required string status = 3;
One of:
- "completed"
- "unhandled-exception"
- "aborted"
- "cancelled-by-scheduler"
}
= 18;
OnThreadMigrated
Occurs when a thread migrates from one runtime to another runtime. This can happen if 'document.write' replaces the current runtime.
Added in version 6.9
event OnThreadMigrated returns (ThreadMigration)
{
-
Added in version 6.9
-
required uint32 threadID = 1;
The ID of the thread that just migrated.
-
required uint32 fromRuntimeID = 2;
The ID of the former runtime for this thread.
-
required uint32 toRuntimeID = 3;
The ID of the new (and current) runtime of this thread.
}
= 43;
OnThreadStarted
event OnThreadStarted returns (ThreadInfo)
{
-
required uint32 runtimeID = 1;
-
required uint32 threadID = 2;
-
required uint32 parentThreadID = 3;
-
required string threadType = 4;
One of:
- "inline"
- "event"
- "linked"
- "timeout"
- "java"
- "unknown"
-
optional string eventNamespace = 5;
present if threadType is "event"
-
optional string eventType = 6;
present if threadType is "event"
}
= 17;
OnThreadStoppedAt
event OnThreadStoppedAt returns (ThreadStopInfo)
{
-
required uint32 runtimeID = 1;
-
required uint32 threadID = 2;
-
required uint32 scriptID = 3;
-
required uint32 lineNumber = 4;
-
required string stoppedReason = 5;
One of:
- `"new script"`, when we're on the first statement of a new script.
- "exception", when an exception occurred.
- "error", when an error ocurred.
- "abort", when the thread was aborted.
- "gc", when garbage collection occurs.
- "broken", when the Break command is used.
- `"debugger statement"`, when a debugger-statement is encountered.
- "breakpoint", when a breakpoint is hit.
- "step", when the 'ContinueThread' command is used.
-
optional uint32 breakpointID = 6;
Present if and only if stoppedReason is "breakpoint"
-
optional Value exceptionValue = 7;
If the stopped reason is "exception" or "error", this field will contain the thrown value.
Added in version 6.8
{
-
Represents an ECMAScript value, a value is either one of the primitives like string or boolean or an object.
-
optional Type type = 1;
The type of value.
Booleans are encoded as either TRUE or FALSE to shorten the number fields in use.
{
-
UNDEFINED = 0;
The undefined type, returned when no value was found or "undefined" was referenced.
-
NULL = 1;
A null value.
-
TRUE = 2;
Boolean value true.
-
FALSE = 3;
Boolean value false.
-
NAN = 4;
NaN value which cannot be exported to JSON directly. Should be treated like a number.
ECMAScript users should use this code to get the value natively::
parseFloat("NaN") -
PLUS_INFINITY = 5;
Plus infinity value which cannot be export to JSON directly. Should be treated like a number.
ECMAScript users should use this code to get the value natively::
parseFloat("Infinity") -
MINUS_INFINITY = 6;
Minus infinity value which cannot be export to JSON directly. Should be treated like a number.
ECMAScript users should use this code to get the value natively::
parseFloat("-Infinity") -
NUMBER = 7;
A number, use the field 'number' for the actual value.
-
STRING = 8;
A string, use the field 'str' for the actual string data.
-
OBJECT = 9;
An object, the field 'object' contains object details.
}
-
-
optional double number = 2;
The numeric value, set if type = NUMBER.
-
optional string str = 3;
The string, set if type = STRING.
-
optional ObjectValue object = 4;
Object information, set if type = OBJECT.
{
-
required uint32 objectID = 1;
-
required bool isCallable = 2;
-
required string type = 3;
type, function or object
-
optional uint32 prototypeID = 4;
-
optional string className = 5;
The class of the object.
-
optional string functionName = 6;
If the object is a function, this is the name of the variable associated with that function (if any).
}
-
}
-
}
= 19;