Interface nsIDocShellType

Hierarchy

Properties

Methods

Properties

allowAuth: boolean

certain docshells (like the message pane) should not throw up auth dialogs because it can act as a password trojan

allowContentRetargeting: boolean

True if the docshell allows its content to be handled by a content listener other than the docshell itself, including the external helper app service, and false otherwise. Defaults to true.

allowContentRetargetingOnChildren: boolean

True if new child docshells should allow content retargeting. Setting allowContentRetargeting also overwrites this value.

allowDNSPrefetch: boolean

Attribute that determines whether DNS prefetch is allowed for this subtree of the docshell tree. Defaults to true. Setting this will make it take effect starting with the next document loaded in the docshell.

allowImages: boolean

Attribute stating whether or not images should be loaded.

allowMedia: boolean

Attribute stating whether or not media (audio/video) should be loaded.

allowMetaRedirects: boolean

Attribute stating if refresh based redirects can be allowed

allowPlugins: boolean

Whether to allow plugin execution

allowSubframes: boolean

Attribute stating if it should allow subframes (framesets/iframes) or not

allowWindowControl: boolean

Attribute that determines whether window control (move/resize) is allowed.

appType: nsIDocShell_AppType
asyncPanZoomEnabled: bool

True iff asynchronous panning and zooming is enabled for this docshell.

browserChild: nsIBrowserChild

The browser child for this docshell.

browsingContext: BrowsingContext

BrowsingContext associated with the DocShell.

busyFlags: nsIDocShell_BusyFlags
charset: string

Upon getting, returns the canonical encoding label of the document currently loaded into this docshell.

childCount: number

The current number of DocShells which are immediate children of the this object.

@deprecated: Prefer using BrowsingContext::Children(), as this count will not include out-of-process iframes.

chromeEventHandler: EventTarget

This attribute allows chrome to tie in to handle DOM events that may be of interest to chrome.

contentViewer: nsIContentViewer

Content Viewer that is currently loaded for this DocShell. This may change as the underlying content changes.

cssErrorReportingEnabled: boolean

Whether CSS error reporting is enabled.

currentDocumentChannel: nsIChannel

Gets the channel for the currently loaded document, if any. For a new document load, this will be the channel of the previous document until after OnLocationChange fires.

currentScrollRestorationIsManual: boolean

Sets/gets the current scroll restoration mode.

See

https://html.spec.whatwg.org/#dom-history-scroll-restoration

customUserAgent: string

This allows chrome to set a custom User agent on a specific docshell

defaultLoadFlags: nsLoadFlags

Default load flags (as defined in nsIRequest) that will be set on all requests made by this docShell and propagated to all child docShells and to nsILoadGroup::defaultLoadFlags for the docShell's loadGroup. Default is no flags. Once set, only future requests initiated by the docShell are affected, so in general, these flags should be set before the docShell loads any content.

domWindow: mozIDOMWindowProxy

Returns the DOM outer window for the content viewer.

editable: boolean
editingSession: nsIEditingSession

The editing session for this docshell.

editor: nsIEditor
eldestPresShell: PresShell

Presentation shell for the oldest document, if this docshell is currently transitioning between documents.

failedChannel: nsIChannel

The channel that failed to load and resulted in an error page. May be null. Relevant only to error pages.

hasEditingSession: boolean

this docShell is editable

hasLoadedNonBlankURI: boolean

This attribute determines whether a document which is not about:blank has already be loaded by this docShell.

historyID: object

The ID of the docshell in the session history.

isAttemptingToNavigate: boolean

Return whether this docshell is "attempting to navigate" in the sense that's relevant to document.open.

isExecutingOnLoadHandler: boolean

Returns true if the docshell is currently executing the onLoad Handler

isForceReloading: bool

Returns true if the current load is a forced reload, e.g. started by holding shift whilst triggering reload.

isInUnload: boolean

Find out whether the docshell is currently in the middle of a page transition. This is set just before the pagehide/unload events fire.

isNavigating: boolean

Whether or not this docshell is executing a nsIWebNavigation navigation method.

This will be true when the following methods are executing: nsIWebNavigation.binaryLoadURI nsIWebNavigation.goBack nsIWebNavigation.goForward nsIWebNavigation.gotoIndex nsIWebNavigation.loadURI

isTopLevelContentDocShell: boolean

Returns true if this docshell is the top level content docshell.

itemType: number

The type this item is.

layoutHistoryState: nsILayoutHistoryState
loadType: number

Attribute to access the loadtype for the document. LoadType Enum is defined in nsDocShellLoadTypes.h

loadURIDelegate: nsILoadURIDelegate

Object used to delegate URI loading to an upper context. Currently only set for GeckoView to allow handling of load requests at the application level.

loadedEntryIndex: number
mayEnableCharacterEncodingMenu: boolean

Indicates whether the UI may enable the character encoding menu. The UI must disable the menu when this property is false.

messageManager: ContentFrameMessageManager

The message manager for this docshell. This does not throw, but can return null if the docshell has no message manager.

metaViewportOverride: nsIDocShell_MetaViewportOverride

This allows chrome to override the default choice of whether the

tag is respected in a specific docshell. Possible values are listed above.
name: string

name of the DocShellTreeItem

outerWindowID: number

Get the id of the outer window that is or will be in this docshell.

parent: nsIDocShellTreeItem

Parent DocShell.

@deprecated: Use BrowsingContext::GetParent() instead. (NOTE: BrowsingContext::GetParent() will not cross isolation boundaries)

presContext: nsPresContext

Presentation context for the currently loaded document. This may be null.

presShell: PresShell

Presentation shell for the currently loaded document. This may be null.

previousEntryIndex: number

Keeps track of the previous nsISHEntry index and the current nsISHEntry index at the time that the doc shell begins to load. Used for ContentViewer eviction.

recordProfileTimelineMarkers: boolean

Whether the docShell records profile timeline markers at the moment

restoringDocument: boolean

Track whether we're currently restoring a document presentation.

rootTreeItem: nsIDocShellTreeItem

Returns the root DocShellTreeItem. This is a convience equivalent to getting the parent and its parent until there isn't a parent.

@deprecated: Use BrowsingContext::Top() instead. (NOTE: BrowsingContext::Top() will not cross isolation boundaries)

sameTypeParent: nsIDocShellTreeItem

This getter returns the same thing parent does however if the parent is of a different itemType, or if the parent is an