Share via


documentModeOverride property

Gets or sets the document-mode emulation state. This value provides a way to run a webpage in an emulated document mode other than the default. If not set, Internet Explorer 11 defaults to EdgeHTML mode.

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

 

This property is read/write.

 

Syntax

JavaScript
object.documentModeOverride = curDocModecurDocMode = object.documentModeOverride

 

Property values

Type: string or number

A string or number that identifies the currently set document-mode emulation value, or sets the current document-mode emulation value.

Value Condition
"edge"

Sets to the equivalent of the meta tag: <meta http-equiv="X-UA-Compatible" content="IE=edge". This defaults to the latest version.

10

Sets to the equivalent of the meta tag: <meta http-equiv="X-UA-Compatible" content="IE=10".

9

Sets to the equivalent of the meta tag: <meta http-equiv="X-UA-Compatible" content="IE=9".

8

Sets to the equivalent of the meta tag: <meta http-equiv="X-UA-Compatible" content="IE=8".

7

Sets to the equivalent of the meta tag: <meta http-equiv="X-UA-Compatible" content="IE=7".

5

Sets to the equivalent of the meta tag: <meta http-equiv="X-UA-Compatible" content="IE=5".

null

Internal document mode is cleared. This is a true null, not an empty string. It is declared as object.documentModeOverride = null;

 

See also

DiagnosticsBrowser