UNPKG

monaca-lib

Version:

Monaca cloud API bindings for JavaScript

831 lines (828 loc) 233 kB
{ "version": { "major": "1", "minor": "1" }, "domains": [{ "domain": "Inspector", "hidden": true, "types": [], "commands": [ { "name": "enable", "description": "Enables inspector domain notifications." }, { "name": "disable", "description": "Disables inspector domain notifications." }, { "name": "reset", "description": "Resets all domains." } ], "events": [ { "name": "evaluateForTestInFrontend", "parameters": [ { "name": "testCallId", "type": "integer" }, { "name": "script", "type": "string" } ] }, { "name": "inspect", "parameters": [ { "name": "object", "$ref": "Runtime.RemoteObject" }, { "name": "hints", "type": "object" } ] }, { "name": "detached", "description": "Fired when remote debugging connection is about to be terminated. Contains detach reason.", "parameters": [ { "name": "reason", "type": "string", "description": "The reason why connection has been terminated." } ] }, { "name": "targetCrashed", "description": "Fired when debugging target has crashed" } ] }, { "domain": "Memory", "hidden": true, "types": [ { "id": "MemoryBlock", "type": "object", "properties": [ { "name": "size", "type": "number", "optional": true, "description": "Size of the block in bytes if available" }, { "name": "name", "type": "string", "description": "Unique name used to identify the component that allocated this block" }, { "name": "children", "type": "array", "optional": true, "items": { "$ref": "MemoryBlock" }} ] }, { "id": "HeapSnapshotChunk", "type": "object", "properties": [ { "name": "strings", "type": "array", "items": { "type": "string" }, "description": "An array of strings that were found since last update." }, { "name": "nodes", "type": "array", "items": { "type": "integer" }, "description": "An array of nodes that were found since last update." }, { "name": "edges", "type": "array", "items": { "type": "integer" }, "description": "An array of edges that were found since last update." }, { "name": "baseToRealNodeId", "type": "array", "items": { "type": "integer" }, "description": "An array of integers for nodeId remapping. Even nodeId has to be mapped to the following odd nodeId." } ] } ], "commands": [ { "name": "getDOMCounters", "returns": [ { "name": "documents", "type": "integer" }, { "name": "nodes", "type": "integer" }, { "name": "jsEventListeners", "type": "integer" } ] } ], "events": [ { "name": "addNativeSnapshotChunk", "parameters": [ { "name": "chunk", "$ref": "HeapSnapshotChunk", "description": "A chunk of the serialized the snapshot." } ] } ] }, { "domain": "Page", "description": "Actions and events related to the inspected page belong to the page domain.", "types": [ { "id": "ResourceType", "type": "string", "enum": ["Document", "Stylesheet", "Image", "Font", "Script", "XHR", "WebSocket", "Other"], "description": "Resource type as it was perceived by the rendering engine." }, { "id": "FrameId", "type": "string", "description": "Unique frame identifier." }, { "id": "Frame", "type": "object", "description": "Information about the Frame on the page.", "properties": [ { "name": "id", "type": "string", "description": "Frame unique identifier." }, { "name": "parentId", "type": "string", "optional": true, "description": "Parent frame identifier." }, { "name": "loaderId", "$ref": "Network.LoaderId", "description": "Identifier of the loader associated with this frame." }, { "name": "name", "type": "string", "optional": true, "description": "Frame's name as specified in the tag." }, { "name": "url", "type": "string", "description": "Frame document's URL." }, { "name": "securityOrigin", "type": "string", "description": "Frame document's security origin." }, { "name": "mimeType", "type": "string", "description": "Frame document's mimeType as determined by the browser." } ] }, { "id": "FrameResourceTree", "type": "object", "description": "Information about the Frame hierarchy along with their cached resources.", "properties": [ { "name": "frame", "$ref": "Frame", "description": "Frame information for this tree item." }, { "name": "childFrames", "type": "array", "optional": true, "items": { "$ref": "FrameResourceTree" }, "description": "Child frames." }, { "name": "resources", "type": "array", "items": { "type": "object", "properties": [ { "name": "url", "type": "string", "description": "Resource URL." }, { "name": "type", "$ref": "ResourceType", "description": "Type of this resource." }, { "name": "mimeType", "type": "string", "description": "Resource mimeType as determined by the browser." }, { "name": "failed", "type": "boolean", "optional": true, "description": "True if the resource failed to load." }, { "name": "canceled", "type": "boolean", "optional": true, "description": "True if the resource was canceled during loading." } ] }, "description": "Information about frame resources." } ], "hidden": true }, { "id": "SearchMatch", "type": "object", "description": "Search match for resource.", "properties": [ { "name": "lineNumber", "type": "number", "description": "Line number in resource content." }, { "name": "lineContent", "type": "string", "description": "Line with match content." } ], "hidden": true }, { "id": "SearchResult", "type": "object", "description": "Search result for resource.", "properties": [ { "name": "url", "type": "string", "description": "Resource URL." }, { "name": "frameId", "$ref": "FrameId", "description": "Resource frame id." }, { "name": "matchesCount", "type": "number", "description": "Number of matches in the resource content." } ], "hidden": true }, { "id": "Cookie", "type": "object", "description": "Cookie object", "properties": [ { "name": "name", "type": "string", "description": "Cookie name." }, { "name": "value", "type": "string", "description": "Cookie value." }, { "name": "domain", "type": "string", "description": "Cookie domain." }, { "name": "path", "type": "string", "description": "Cookie path." }, { "name": "expires", "type": "number", "description": "Cookie expires." }, { "name": "size", "type": "integer", "description": "Cookie size." }, { "name": "httpOnly", "type": "boolean", "description": "True if cookie is http-only." }, { "name": "secure", "type": "boolean", "description": "True if cookie is secure." }, { "name": "session", "type": "boolean", "description": "True in case of session cookie." } ], "hidden": true }, { "id": "ScriptIdentifier", "type": "string", "description": "Unique script identifier.", "hidden": true }, { "id": "NavigationEntry", "type": "object", "description": "Navigation history entry.", "properties": [ { "name": "id", "type": "integer", "description": "Unique id of the navigation history entry." }, { "name": "url", "type": "string", "description": "URL of the navigation history entry." }, { "name": "title", "type": "string", "description": "Title of the navigation history entry." } ], "hidden": true } ], "commands": [ { "name": "enable", "description": "Enables page domain notifications." }, { "name": "disable", "description": "Disables page domain notifications." }, { "name": "addScriptToEvaluateOnLoad", "parameters": [ { "name": "scriptSource", "type": "string" } ], "returns": [ { "name": "identifier", "$ref": "ScriptIdentifier", "description": "Identifier of the added script." } ], "hidden": true }, { "name": "removeScriptToEvaluateOnLoad", "parameters": [ { "name": "identifier", "$ref": "ScriptIdentifier" } ], "hidden": true }, { "name": "reload", "parameters": [ { "name": "ignoreCache", "type": "boolean", "optional": true, "description": "If true, browser cache is ignored (as if the user pressed Shift+refresh)." }, { "name": "scriptToEvaluateOnLoad", "type": "string", "optional": true, "description": "If set, the script will be injected into all frames of the inspected page after reload." }, { "name": "scriptPreprocessor", "type": "string", "optional": true, "description": "Script body that should evaluate to function that will preprocess all the scripts before their compilation.", "hidden": true } ], "description": "Reloads given page optionally ignoring the cache." }, { "name": "navigate", "parameters": [ { "name": "url", "type": "string", "description": "URL to navigate the page to." } ], "description": "Navigates current page to the given URL." }, { "name": "getNavigationHistory", "parameters": [], "returns": [ { "name": "currentIndex", "type": "integer", "description": "Index of the current navigation history entry." }, { "name": "entries", "type": "array", "items": { "$ref": "NavigationEntry"}, "description": "Array of navigation history entries." } ], "description": "Returns navigation history for the current page.", "hidden": true }, { "name": "navigateToHistoryEntry", "parameters": [ { "name": "entryId", "type": "integer", "description": "Unique id of the entry to navigate to." } ], "description": "Navigates current page to the given history entry.", "hidden": true }, { "name": "getCookies", "returns": [ { "name": "cookies", "type": "array", "items": { "$ref": "Cookie"}, "description": "Array of cookie objects." }, { "name": "cookiesString", "type": "string", "description": "document.cookie string representation of the cookies." } ], "description": "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>.", "hidden": true }, { "name": "deleteCookie", "parameters": [ { "name": "cookieName", "type": "string", "description": "Name of the cookie to remove." }, { "name": "url", "type": "string", "description": "URL to match cooke domain and path." } ], "description": "Deletes browser cookie with given name, domain and path.", "hidden": true }, { "name": "getResourceTree", "description": "Returns present frame / resource tree structure.", "returns": [ { "name": "frameTree", "$ref": "FrameResourceTree", "description": "Present frame / resource tree structure." } ], "hidden": true }, { "name": "getResourceContent", "description": "Returns content of the given resource.", "parameters": [ { "name": "frameId", "$ref": "FrameId", "description": "Frame id to get resource for." }, { "name": "url", "type": "string", "description": "URL of the resource to get content for." } ], "returns": [ { "name": "content", "type": "string", "description": "Resource content." }, { "name": "base64Encoded", "type": "boolean", "description": "True, if content was served as base64." } ], "hidden": true }, { "name": "searchInResource", "description": "Searches for given string in resource content.", "parameters": [ { "name": "frameId", "$ref": "FrameId", "description": "Frame id for resource to search in." }, { "name": "url", "type": "string", "description": "URL of the resource to search in." }, { "name": "query", "type": "string", "description": "String to search for." }, { "name": "caseSensitive", "type": "boolean", "optional": true, "description": "If true, search is case sensitive." }, { "name": "isRegex", "type": "boolean", "optional": true, "description": "If true, treats string parameter as regex." } ], "returns": [ { "name": "result", "type": "array", "items": { "$ref": "SearchMatch" }, "description": "List of search matches." } ], "hidden": true }, { "name": "searchInResources", "description": "Searches for given string in frame / resource tree structure.", "parameters": [ { "name": "text", "type": "string", "description": "String to search for." }, { "name": "caseSensitive", "type": "boolean", "optional": true, "description": "If true, search is case sensitive." }, { "name": "isRegex", "type": "boolean", "optional": true, "description": "If true, treats string parameter as regex." } ], "returns": [ { "name": "result", "type": "array", "items": { "$ref": "SearchResult" }, "description": "List of search results." } ], "hidden": true }, { "name": "setDocumentContent", "description": "Sets given markup as the document's HTML.", "parameters": [ { "name": "frameId", "$ref": "FrameId", "description": "Frame id to set HTML for." }, { "name": "html", "type": "string", "description": "HTML content to set." } ], "hidden": true }, { "name": "setDeviceMetricsOverride", "description": "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.", "parameters": [ { "name": "width", "type": "integer", "description": "Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override." }, { "name": "height", "type": "integer", "description": "Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override." }, { "name": "fontScaleFactor", "type": "number", "description": "Overriding font scale factor value (must be positive). 1 disables the override." }, { "name": "fitWindow", "type": "boolean", "description": "Whether a view that exceeds the available browser window area should be scaled down to fit." } ], "hidden": true }, { "name": "setShowPaintRects", "description": "Requests that backend shows paint rectangles", "parameters": [ { "name": "result", "type": "boolean", "description": "True for showing paint rectangles" } ], "hidden": true }, { "name": "setShowDebugBorders", "description": "Requests that backend shows debug borders on layers", "parameters": [ { "name": "show", "type": "boolean", "description": "True for showing debug borders" } ], "hidden": true }, { "name": "setShowFPSCounter", "description": "Requests that backend shows the FPS counter", "parameters": [ { "name": "show", "type": "boolean", "description": "True for showing the FPS counter" } ], "hidden": true }, { "name": "setContinuousPaintingEnabled", "description": "Requests that backend enables continuous painting", "parameters": [ { "name": "enabled", "type": "boolean", "description": "True for enabling cointinuous painting" } ], "hidden": true }, { "name": "setShowScrollBottleneckRects", "description": "Requests that backend shows scroll bottleneck rects", "parameters": [ { "name": "show", "type": "boolean", "description": "True for showing scroll bottleneck rects" } ], "hidden": true }, { "name": "getScriptExecutionStatus", "description": "Determines if scripts can be executed in the page.", "returns": [ { "name": "result", "type": "string", "enum": ["allowed", "disabled", "forbidden"], "description": "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." } ], "hidden": true }, { "name": "setScriptExecutionDisabled", "description": "Switches script execution in the page.", "parameters": [ { "name": "value", "type": "boolean", "description": "Whether script execution should be disabled in the page." } ], "hidden": true }, { "name": "setGeolocationOverride", "description": "Overrides the Geolocation Position or Error.", "parameters": [ { "name": "latitude", "type": "number", "optional": true, "description": "Mock longitude"}, { "name": "longitude", "type": "number", "optional": true, "description": "Mock latitude"}, { "name": "accuracy", "type": "number", "optional": true, "description": "Mock accuracy"} ] }, { "name": "clearGeolocationOverride", "description": "Clears the overriden Geolocation Position and Error." }, { "name": "setDeviceOrientationOverride", "description": "Overrides the Device Orientation.", "parameters": [ { "name": "alpha", "type": "number", "description": "Mock alpha"}, { "name": "beta", "type": "number", "description": "Mock beta"}, { "name": "gamma", "type": "number", "description": "Mock gamma"} ], "hidden": true }, { "name": "clearDeviceOrientationOverride", "description": "Clears the overridden Device Orientation.", "hidden": true }, { "name": "setTouchEmulationEnabled", "parameters": [ { "name": "enabled", "type": "boolean", "description": "Whether the touch event emulation should be enabled." } ], "description": "Toggles mouse event-based touch event emulation.", "hidden": true }, { "name": "setEmulatedMedia", "parameters": [ { "name": "media", "type": "string", "description": "Media type to emulate. Empty string disables the override." } ], "description": "Emulates the given media for CSS media queries.", "hidden": true }, { "name": "captureScreenshot", "description": "Capture page screenshot.", "parameters": [ { "name": "format", "type": "string", "optional": true, "enum": ["jpeg", "png"], "description": "Image compression format." }, { "name": "quality", "type": "integer", "hidden": true, "optional": true, "description": "Compression quality from range [0..100]." }, { "name": "maxWidth", "type": "integer", "hidden": true, "optional": true, "description": "Maximum screenshot width." }, { "name": "maxHeight", "type": "integer", "hidden": true, "optional": true, "description": "Maximum screenshot height." } ], "returns": [ { "name": "data", "type": "string", "description": "Base64-encoded image data (PNG)." }, { "name": "deviceScaleFactor", "type": "number", "hidden": true, "description": "Device scale factor." }, { "name": "pageScaleFactor", "type": "number", "hidden": true, "description": "Page scale factor." }, { "name": "viewport", "$ref": "DOM.Rect", "hidden": true, "description": "Viewport in CSS pixels." } ], "hidden": true }, { "name": "startScreencast", "description": "Starts sending each frame using the <code>screencastFrame</code> event.", "parameters": [ { "name": "format", "type": "string", "optional": true, "enum": ["jpeg", "png"], "description": "Image compression format." }, { "name": "quality", "type": "integer", "optional": true, "description": "Compression quality from range [0..100]." }, { "name": "maxWidth", "type": "integer", "optional": true, "description": "Maximum screenshot width." }, { "name": "maxHeight", "type": "integer", "optional": true, "description": "Maximum screenshot height." } ], "hidden": true }, { "name": "stopScreencast", "description": "Stops sending each frame in the <code>screencastFrame</code>.", "hidden": true }, { "name": "handleJavaScriptDialog", "description": "Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).", "parameters": [ { "name": "accept", "type": "boolean", "description": "Whether to accept or dismiss the dialog." }, { "name": "promptText", "type": "string", "optional": true, "description": "The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog." } ], "hidden": true }, { "name": "setShowViewportSizeOnResize", "description": "Paints viewport size upon main frame resize.", "parameters": [ { "name": "show", "type": "boolean", "description": "Whether to paint size or not." }, { "name": "showGrid", "type": "boolean", "optional": true, "description": "Whether to paint grid as well." } ], "hidden": true }, { "name": "setForceCompositingMode", "description": "Force accelerated compositing mode for inspected page.", "parameters": [ { "name": "force", "type": "boolean", "description": "Whether to force accelerated compositing or not." } ], "hidden": true } ], "events": [ { "name": "domContentEventFired", "parameters": [ { "name": "timestamp", "type": "number" } ] }, { "name": "loadEventFired", "parameters": [ { "name": "timestamp", "type": "number" } ] }, { "name": "frameAttached", "description": "Fired when frame has been attached to its parent.", "parameters": [ { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has been attached." } ] }, { "name": "frameNavigated", "description": "Fired once navigation of the frame has completed. Frame is now associated with the new loader.", "parameters": [ { "name": "frame", "$ref": "Frame", "description": "Frame object." } ] }, { "name": "frameDetached", "description": "Fired when frame has been detached from its parent.", "parameters": [ { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has been detached." } ] }, { "name": "frameStartedLoading", "description": "Fired when frame has started loading.", "parameters": [ { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has started loading." } ], "hidden": true }, { "name": "frameStoppedLoading", "description": "Fired when frame has stopped loading.", "parameters": [ { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has stopped loading." } ], "hidden": true }, { "name": "frameScheduledNavigation", "description": "Fired when frame schedules a potential navigation.", "parameters": [ { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has scheduled a navigation." }, { "name": "delay", "type": "number", "description": "Delay (in seconds) until the navigation is scheduled to begin. The navigation is not guaranteed to start." } ], "hidden": true }, { "name": "frameClearedScheduledNavigation", "description": "Fired when frame no longer has a scheduled navigation.", "parameters": [ { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has cleared its scheduled navigation." } ], "hidden": true }, { "name": "javascriptDialogOpening", "description": "Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.", "parameters": [ { "name": "message", "type": "string", "description": "Message that will be displayed by the dialog." } ], "hidden": true }, { "name": "javascriptDialogClosed", "description": "Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.", "hidden": true }, { "name": "scriptsEnabled", "description": "Fired when the JavaScript is enabled/disabled on the page", "parameters": [ { "name": "isEnabled", "type": "boolean", "description": "Whether script execution is enabled or disabled on the page." } ], "hidden": true }, { "name": "screencastFrame", "description": "Compressed image data requested by the <code>startScreencast</code>.", "parameters": [ { "name": "data", "type": "string", "description": "Base64-encoded compressed image." }, { "name": "deviceScaleFactor", "type": "number", "hidden": true, "optional": true, "description": "Device scale factor." }, { "name": "pageScaleFactor", "type": "number", "hidden": true, "optional": true, "description": "Page scale factor." }, { "name": "viewport", "$ref": "DOM.Rect", "hidden": true, "optional": true, "description": "Viewport in CSS pixels." }, { "name": "offsetTop", "type": "number", "hidden": true, "optional": true, "description": "Top offset in DIP." }, { "name": "offsetBottom", "type": "number", "hidden": true, "optional": true, "description": "Bottom offset in DIP." } ], "hidden": true } ] }, { "domain": "Runtime", "description": "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.", "types": [ { "id": "RemoteObjectId", "type": "string", "description": "Unique object identifier." }, { "id": "RemoteObject", "type": "object", "description": "Mirror object referencing original JavaScript object.", "properties": [ { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean"], "description": "Object type." }, { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date"], "description": "Object subtype hint. Specified for <code>object</code> type values only." }, { "name": "className", "type": "string", "optional": true, "description": "Object class (constructor) name. Specified for <code>object</code> type values only." }, { "name": "value", "type": "any", "optional": true, "description": "Remote object value (in case of primitive values or JSON values if it was requested)." }, { "name": "description", "type": "string", "optional": true, "description": "String representation of the object." }, { "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Unique object identifier (for non-primitive values)." }, { "name": "preview", "$ref": "ObjectPreview", "optional": true, "description": "Preview containing abbreviated property values.", "hidden": true } ] }, { "id": "ObjectPreview", "type": "object", "hidden": true, "description": "Object containing abbreviated remote object value.", "properties": [ { "name": "lossless", "type": "boolean", "description": "Determines whether preview is lossless (contains all information of the original object)." }, { "name": "overflow", "type": "boolean", "description": "True iff some of the properties of the original did not fit." }, { "name": "properties", "type": "array", "items": { "$ref": "PropertyPreview" }, "description": "List of the properties." } ] }, { "id": "PropertyPreview", "type": "object", "hidden": true, "properties": [ { "name": "name", "type": "string", "description": "Property name." }, { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean"], "description": "Object type." }, { "name": "value", "type": "string", "optional": true, "description": "User-friendly property value string." }, { "name": "valuePreview", "$ref": "ObjectPreview", "optional": true, "description": "Nested value preview." }, { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date"], "description": "Object subtype hint. Specified for <code>object</code> type values only." } ] }, { "id": "PropertyDescriptor", "type": "object", "description": "Object property descriptor.", "properties": [ { "name": "name", "type": "string", "description": "Property name." }, { "name": "value", "$ref": "RemoteObject", "optional": true, "description": "The value associated with the property." }, { "name": "writable", "type": "boolean", "optional": true, "description": "True if the value associated with the property may be changed (data descriptors only)." }, { "name": "get", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only)." }, { "name": "set", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a setter for the property, or <code>undefined</code> if there is no setter (accessor descriptors only)." }, { "name": "configurable", "type": "boolean", "description": "True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object." }, { "name": "enumerable", "type": "boolean", "description": "True if this property shows up during enumeration of the properties on the corresponding object." }, { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." }, { "name": "isOwn", "optional": true, "type": "boolean", "description": "True if the property is owned for the object.", "hidden": true } ] }, { "id": "InternalPropertyDescriptor", "type": "object", "description": "Object internal property descriptor. This property isn't normally visible in JavaScript code.", "properties": [ { "name": "name", "type": "string", "description": "Conventional property name." }, { "name": "value", "$ref": "RemoteObject", "optional": true, "description": "The value associated with the property." } ], "hidden": true }, { "id": "CallArgument", "type": "object", "description": "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.", "properties": [ { "name": "value", "type": "any", "optional": true, "description": "Primitive value." }, { "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Remote object handle." } ] }, { "id": "ExecutionContextId", "type": "integer", "description": "Id of an execution context." }, { "id": "ExecutionContextDescription", "type": "object", "description": "Description of an isolated world.", "properties": [ { "name": "id", "$ref": "ExecutionContextId", "description": "Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed." }, { "name": "isPageContext", "type": "boolean", "description": "True if this is a context where inpspected web page scripts run. False if it is a content script isolated context.", "hidden": true }, { "name": "name", "type": "string", "description": "Human readable name describing given context.", "hidden": true}, { "name": "frameId", "$ref": "Page.FrameId", "description": "Id of the owning frame." } ] } ], "commands": [ { "name": "evaluate", "parameters": [ { "name": "expression", "type": "string", "description": "Expression to evaluate." }, { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }, { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Determines whether Command Line API should be available during the evaluation.", "hidden": true }, { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state.", "hidden": true }, { "name": "contextId", "$ref": "Runtime.ExecutionContextId", "optional": true, "description": "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." }, { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." }, { "name": "generatePreview", "type": "boolean", "optional": true, "hidden": true, "description": "Whether preview should be generated for the result." } ], "returns": [ { "name": "result", "$ref": "RemoteObject", "description": "Evaluation result." }, { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." } ], "description": "Evaluates expression on global object." }, { "name": "callFunctionOn", "parameters": [ { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to call function on." }, { "name": "functionDeclaration", "type": "string", "description": "Declaration of the function to call." }, { "name": "arguments", "type": "array", "items": { "$ref": "CallArgument", "description": "Call argument." }, "optional": true, "description": "Call arguments. All call arguments must belong to the same JavaScript world as the target object." }, { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether function call should stop on exceptions and mute console. Overrides setPauseOnException state.", "hidden": true }, { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object which should be sent by value." }, { "name": "generatePreview", "type": "boolean", "optional": true, "hidden": true, "description": "Whether preview should be generated for the result." } ], "returns": [ { "name": "result", "$ref": "RemoteObject", "description": "Call result." }, { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." } ], "description": "Calls function with given declaration on the given object. Object group of the result is inherited from the target object." }, { "name": "getProperties", "parameters": [ { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to return properties for." }, { "name": "ownProperties", "optional": true, "type": "boolean", "description": "If true, returns properties belonging only to the element itself, not to its prototype chain." }, { "name": "accessorPropertiesOnly", "optional": true, "type": "boolean", "description": "If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.", "hidden": true } ], "returns": [ { "name": "result", "type": "array", "items": { "$ref": "PropertyDescriptor"}, "description": "Object properties." }, { "name": "internalProperties", "optional": true, "type": "array", "items": { "$ref": "InternalPropertyDescriptor"}, "description": "Internal object properties (only of the element itself).", "hidden": true } ], "description": "Returns properties of a given object. Object group of the result is inherited from the target object." }, { "name": "releaseObject", "parameters": [ { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to release." } ], "description": "Releases remote object with given id." }, { "name": "releaseObjectGroup", "parameters": [ { "name": "objectGroup", "type": "string", "description": "Symbolic object group name." } ], "description": "Releases all remote objects that belong to a given group." }, { "name": "run", "hidden": true, "description": "Tells inspected instance(worker or page) that it can run in case it was started paused." }, { "name": "enable", "description": "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." }, { "name": "disable", "hidden": true, "description": "Disables reporting of execution contexts creation." } ], "events": [ { "name": "executionContextCreated", "parameters": [ { "name": "context", "$ref": "ExecutionContextDescription", "description": "A newly created execution contex." } ], "description": "Issued when new execution context is created." } ] }, { "domain": "Console", "description": "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.", "types": [ { "id": "Timestamp", "type": "number", "description": "Number of seconds since epoch.", "hidden": true }, { "id": "ConsoleMessage", "type": "object", "description": "Console message.", "properties": [ { "name": "source", "type": "string", "enum": ["xml", "javascript", "network", "console-api", "storage", "appcache", "rendering", "css", "security", "other", "deprecation"], "description": "Message source." }, { "name": "level", "type": "string", "enum": ["log", "warning", "error", "debug"], "description": "Message severity." }, { "name": "text", "type": "string", "description": "Message text." }, { "name": "type", "type": "string", "optional": true, "enum": ["log", "dir", "dirxml", "table", "trace", "clear", "startGroup", "startGroupCollapsed", "endGroup", "assert", "timing", "profile", "profileEnd"], "description": "Console message type." }, { "name": "url", "type": "string", "optional": true, "description": "URL of the message origin." }, { "name": "line", "type": "integer", "optional": true, "description": "Line number in the resource that generated this message." }, { "name": "column", "type": "integer", "optional": true, "description": "Column number in the resource that generated this message." }, { "name": "repeatCount", "type": "integer", "optional": true, "description": "Repeat count for repeated messages." }, { "name": "parameters", "type": "array", "items": { "$ref": "Runtime.RemoteObject" }, "optional": true, "description": "Message parameters in case of the formatted message." }, { "name": "stackTrace", "$ref": "StackTrace", "optional": true, "description": "JavaScript stack trace for assertions and error messages." }, { "name": "networkRequestId", "$ref": "Network.RequestId", "optional": true, "description": "Identifier of the network request associated with this message." }, { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp, when this message was fired.", "hidden": true } ] }, { "id": "CallFrame", "type": "object", "description": "Stack entry for console errors and assertions.", "properties": [ { "name": "functionName", "type": "string", "description": "JavaScript function name." },