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.
True if new child docshells should allow content retargeting. Setting allowContentRetargeting also overwrites this value.
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.
Attribute stating whether or not images should be loaded.
Attribute stating whether or not media (audio/video) should be loaded.
Attribute stating if refresh based redirects can be allowed
Whether to allow plugin execution
Attribute stating if it should allow subframes (framesets/iframes) or not
Attribute that determines whether window control (move/resize) is allowed.
Readonly
asyncTrue iff asynchronous panning and zooming is enabled for this docshell.
Readonly
browserThe browser child for this docshell.
Readonly
browsingBrowsingContext associated with the DocShell.
Readonly
busyReadonly
charsetUpon getting, returns the canonical encoding label of the document currently loaded into this docshell.
Readonly
childThe 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.
This attribute allows chrome to tie in to handle DOM events that may be of interest to chrome.
Readonly
contentContent Viewer that is currently loaded for this DocShell. This may change as the underlying content changes.
Whether CSS error reporting is enabled.
Readonly
currentGets 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.
Sets/gets the current scroll restoration mode.
https://html.spec.whatwg.org/#dom-history-scroll-restoration
This allows chrome to set a custom User agent on a specific docshell
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.
Readonly
domReturns the DOM outer window for the content viewer.
Readonly
editableReadonly
editingThe editing session for this docshell.
Readonly
eldestPresentation shell for the oldest document, if this docshell is currently transitioning between documents.
Readonly
failedThe channel that failed to load and resulted in an error page. May be null. Relevant only to error pages.
Readonly
hasthis docShell is editable
Readonly
hasThis attribute determines whether a document which is not about:blank has already be loaded by this docShell.
Readonly
historyIDThe ID of the docshell in the session history.
Readonly
isReturn whether this docshell is "attempting to navigate" in the sense that's relevant to document.open.
Readonly
isReturns true if the docshell is currently executing the onLoad Handler
Readonly
isReturns true if the current load is a forced reload, e.g. started by holding shift whilst triggering reload.
Readonly
isFind out whether the docshell is currently in the middle of a page transition. This is set just before the pagehide/unload events fire.
Readonly
isWhether 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
Readonly
isReturns true if this docshell is the top level content docshell.
Readonly
itemThe type this item is.
Attribute to access the loadtype for the document. LoadType Enum is defined in nsDocShellLoadTypes.h
Readonly
loadURIDelegateObject used to delegate URI loading to an upper context. Currently only set for GeckoView to allow handling of load requests at the application level.
Readonly
loadedReadonly
mayIndicates whether the UI may enable the character encoding menu. The UI must disable the menu when this property is false.
Readonly
messageThe message manager for this docshell. This does not throw, but can return null if the docshell has no message manager.
This allows chrome to override the default choice of whether the
tag is respected in a specific docshell. Possible values are listed above.name of the DocShellTreeItem
Readonly
outerGet the id of the outer window that is or will be in this docshell.
Readonly
parentParent DocShell.
@deprecated: Use BrowsingContext::GetParent()
instead.
(NOTE: BrowsingContext::GetParent()
will not cross isolation boundaries)
Readonly
presPresentation context for the currently loaded document. This may be null.
Readonly
presPresentation shell for the currently loaded document. This may be null.
Readonly
previousKeeps 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.
Whether the docShell records profile timeline markers at the moment
Readonly
restoringTrack whether we're currently restoring a document presentation.
Readonly
rootReturns 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)
Readonly
sameThis getter returns the same thing parent does however if the parent is of a different itemType, or if the parent is an
@deprecated: Use BrowsingContext::GetParent()
instead.
Readonly
sameReturns the root DocShellTreeItem of the same type. This is a convience equivalent to getting the parent of the same type and its parent until there isn't a parent.
@deprecated: Use BrowsingContext::Top()
instead.
Readonly
treeThe owner of the DocShell Tree. This interface will be called upon when the docshell has things it needs to tell to the owner of the docshell. Note that docShell tree ownership does not cross tree types. Meaning setting ownership on a chrome tree does not set ownership on the content sub-trees. A given tree's boundaries are identified by the type changes. Trees of different types may be connected, but should not be traversed for things such as ownership.
Note implementers of this interface should NOT effect the lifetime of the parent DocShell by holding this reference as it creates a cycle. Owners when releasing this interface should set the treeOwner to nullptr. Implementers of this interface are guaranteed that when treeOwner is set that the poitner is valid without having to addref.
Further note however when others try to get the interface it should be addref'd before handing it to them.
attribute to access whether error pages are enabled
Attribute that determines whether tracking protection is enabled.
Allow usage of -moz-window-dragging:drag for content docshells. True for top level chrome docshells. Throws if set to false with top level chrome docshell.
Set/Get the document scale factor. When setting this attribute, a NS_ERROR_NOT_IMPLEMENTED error may be returned by implementations not supporting zoom. Implementations not supporting zoom should return 1.0 all the time for the Get operation. 1.0 by the way is the default of zoom. This means 100% of normal scaling or in other words normal size no zoom.
Optional
aInstancePtr: objectA run time mechanism for interface discovery.
NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.
aInstancePtr must not be null.
[in] A requested interface IID
[out] A pointer to an interface pointer to receive the result.
Take ownership of the ClientSource representing an initial about:blank document that was never needed. As an optimization we avoid creating this document if no code calls GetDocument(), but we still need a ClientSource object to represent the about:blank window. This may return nullptr; for example if the docshell has created a real window and document already.
Add a new child DocShellTreeItem. Adds to the end of the list. Note that this does NOT take a reference to the child. The child stays alive only as long as it's referenced from outside the docshell tree.
NS_ERROR_ILLEGAL_VALUE if child corresponds to the same object as this treenode or an ancestor of this treenode
NS_ERROR_UNEXPECTED if this node is a leaf in the tree.
Begin firing WebProgressListener notifications for restoring a page presentation. |viewer| is the content viewer whose document we are starting to load. If null, it defaults to the docshell's current content viewer, creating one if necessary. |top| should be true for the toplevel docshell that is being restored; it will be set to false when this method is called for child docshells. This method will post an event to complete the simulated load after returning to the event loop.
Create a new about:blank document and content viewer.
the principal to use for the new document.
the partitioned principal to use for the new document.
Display a load error in a frame while keeping that frame's currentURI pointing correctly to the page where the error ocurred, rather than to the error document page. You must provide either the aURI or aURL parameter.
The error code to be displayed
nsIURI of the page where the error happened
wstring of the page where the error happened
The channel related to this error
Returns whether or not we displayed an error page (note: will always return false if in-content error pages are disabled!)
Notify the associated content viewer and all child docshells that they are about to be hidden. If |isUnload| is true, then the document is being unloaded and all dynamic subframe history entries are removed as well.
True to fire the unload event in addition to the pagehide event, and remove all dynamic subframe history entries.
Return the child at the index requested. This is 0-based.
@deprecated: Prefer using BrowsingContext::Children()
, as this will not
include out-of-process iframes.
NS_ERROR_UNEXPECTED if the index is out of range
Loads a given URI. This will give priority to loading the requested URI in the object implementing this interface. If it can't be loaded here however, the URL dispatcher will go through its normal process of content loading.
This is the extended load info for this load.
If we should set isNavigating to true while initiating the load.
this docShell has an editing session
Make this docShell editable, setting a flag that causes an editor to get created, either immediately, or after a url has been loaded.
true to wait for a URI before creating the editor.
Notify DocShell when the browser is about to start executing JS, and after that execution has stopped. This only occurs when the Timeline devtool is collecting information.
Notify all attached observers that a reflow has just occurred.
if true, the reflow was interruptible.
timestamp when reflow started, in milliseconds since navigationStart (accurate to 1/1000 of a ms)
timestamp when reflow ended, in milliseconds since navigationStart (accurate to 1/1000 of a ms)
This attempts to save any applicable layout history state (like scroll position) in the nsISHEntry. This is normally done automatically when transitioning from page to page in the same process. We expose this function to support transitioning from page to page across processes as a workaround for bug 1630234 until session history state is moved into the parent process.
Tells the docshell to offer focus to its tree owner. This is currently only necessary for embedding chrome. If forDocumentNavigation is true, then document navigation should be performed, where only the root of documents are selected. Otherwise, the next element in the parent should be returned. Returns true if focus was successfully taken by the tree owner.
Generated using TypeDoc
certain docshells (like the message pane) should not throw up auth dialogs because it can act as a password trojan