DiagnosticsBrowser object

An object which gives access to browser-related properties and events.

Note These APIs can only be used with F12 developer tools and the Diagnostics Script Engine, and can't be called from JavaScript.

Syntax

 var oBrowser = DiagnosticsGlobalScope.browser;

DOM Information

Inheritance Hierarchy

The DiagnosticsBrowser does not inherit from any class or interface.

Members

The DiagnosticsBrowser object has these types of members:

  • Methods
  • Properties

Methods

The DiagnosticsBrowser object has these methods.

Method Description
addEventListener

Registers an event listener of the given type to the object.

createSafeFunction

Returns a function wrapping the passed-in function.

executeScript

Synchronously runs a script in the WebWorkerDiagnosticsDiagnostics object model.

highlightElement

Displays a highlighting box and rules for a given element, using CSS colors passed in string form for each of the box-model regions.

refresh

Refreshes the current page.

removeEventListener

Unregisters a previously registered event listener of the given type.

takeVisualSnapshot

Takes a screen capture of the current document.

Properties

The DiagnosticsBrowser object has these properties.

Property Access type Description

browserMode

Read-only

Returns the browser mode.

defaultDocumentMode

Read-only

Returns the default document mode for the browser.

document

Read-only

Provides access the current document.

documentMode

Read-only

Returns the current document mode.

documentModeOverride

Read/write

Gets or sets the document-mode emulation state.

elementSelectionEventsEnabled

Read/write

Sets or gets the firing of the selectElement and hoverElement events.

forceEdgeModeDocumentFamily

Read/write

Sets or gets whether document mode is forced to be edge.

workers

Read-only

Returns an object where the keys are the ids of the currently running webworkers and the values are instances of DiagnosticsWebWorker.

workerStartupScript

Read/write

Gets or sets the worker startup script.