stable (1.2) stable RC (1.3) 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.

Methods

Browser.close

Close browser gracefully.

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.getWindowBounds

Get position and size of the browser window. Experimental

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.

Browser.getWindowForTarget

Get the browser window that contains the devtools target. Experimental

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.setWindowBounds

Set position and/or size of the browser window. Experimental

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.

Types

WindowID

Experimental

Type: integer

WindowState

The state of the browser window. Experimental

Type: string

Allowed values

normal, minimized, maximized, fullscreen.

Bounds

Browser window bounds information Experimental

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.