stable (1.2) latest (tip-of-tree) v8-inspector (node) Home
Domains
Accessibility Animation ApplicationCache Audits Browser CSS CacheStorage Console DOM DOMDebugger DOMSnapshot DOMStorage Database Debugger DeviceOrientation Emulation HeadlessExperimental HeapProfiler IO IndexedDB Input Inspector LayerTree Log Memory Network Overlay Page Performance Profiler Runtime Schema Security ServiceWorker Storage SystemInfo Target Tethering Tracing
Chrome DevTools Protocol Viewer - latest (tip-of-tree)

Browser Domain

The Browser domain defines methods and events for browser managing.

Experimental

Methods

Browser.close

Close browser gracefully.

Browser.getWindowForTarget

Get the browser window that contains the devtools target.

Parameters
targetId
Target.TargetID Devtools agent host id.
Return object
windowId
WindowID Browser window id.
bounds
Bounds Bounds information of the window. When window state is 'minimized', the restored window position and size are returned.

Browser.getVersion

Returns version information.

Return object
protocolVersion
string Protocol version.
product
string Product name.
revision
string Product revision.
userAgent
string User-Agent.
jsVersion
string V8 version.

Browser.setWindowBounds

Set position and/or size of the browser window.

Parameters
windowId
WindowID Browser window id.
bounds
Bounds New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged.

Browser.getWindowBounds

Get position and size of the browser window.

Parameters
windowId
WindowID Browser window id.
Return object
bounds
Bounds Bounds information of the window. When window state is 'minimized', the restored window position and size are returned.

Types

WindowID

Type: integer

WindowState

The state of the browser window.

Type: string

Allowed values

normal, minimized, maximized, fullscreen.

Bounds

Browser window bounds information

Type: object

Properties
left
integer The offset from the left edge of the screen to the window in pixels.
top
integer The offset from the top edge of the screen to the window in pixels.
width
integer The window width in pixels.
height
integer The window height in pixels.
windowState
WindowState The window state. Default to normal.