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
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
Release all objects (that is, object received through this protocol as objectIDs), so they can be garbage collected by the ecmascript engine. Note that garbage collection is not necessarily run at this point, so the memory for the given objects might not be freed immediately. IMPORTANT: After this call, no object IDs received earlier are valid! All objects needs to be requested again.
This event is issued for XML events on the host, if a corresponding AddEventHandler has been issued earlier by the client.
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.