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.
uri | - The URI to load. |
loadInfo | - This is the extended load info for this load. This most often will be null, but if you need to do additional setup for this load you can get a loadInfo object by calling createLoadInfo. Once you have this object you can set the needed properties on it and then pass it to loadURI. |
aLoadFlags | - Flags to modify load behaviour. Flags are defined in nsIWebNavigation. Note that using flags outside LOAD_FLAGS_MASK is only allowed if passing in a non-null loadInfo. And even some of those might not be allowed. Use at your own risk. |
Loads a given stream. This will give priority to loading the requested
stream in the object implementing this interface. If it can’t be loaded
here however, the URL dispatched will go through its normal process of
content loading.
aStream | - The input stream that provides access to the data to be loaded. This must be a blocking, threadsafe stream implementation. |
aURI | - The URI representing the stream, or null. |
aContentType | - The type (MIME) of data being loaded (empty if unknown). |
aContentCharset | - The charset of the data being loaded (empty if unknown). |
aLoadInfo | - This is the extended load info for this load. This most often will be null, but if you need to do additional setup for this load you can get a loadInfo object by calling createLoadInfo. Once you have this object you can set the needed properties on it and then pass it to loadStream. |
Loads the given URI. This method is identical to loadURI(…) except
that its parameter list is broken out instead of being packaged inside
of an nsIDocShellLoadInfo object…
aURI | - The URI to load. |
aReferrer | - Referring URI |
aOwner | - Owner (security principal) |
aInheritOwner | - Flag indicating whether the owner of the current document should be inherited if aOwner is null. |
aStopActiveDoc | - Flag indicating whether loading the current document should be stopped. |
aWindowTarget | - Window target for the load. |
aTypeHint | - A hint as to the content-type of the resulting data. May be null or empty if no hint. |
aFileName | - Non-null when the link should be downloaded as the given filename. |
aPostDataStream | - Post data stream (if POSTing) |
aHeadersStream | - Stream containing "extra" request headers... |
aLoadFlags | - Flags to modify load behaviour. Flags are defined in nsIWebNavigation. |
aSHEntry | - Active Session History entry (if loading from SH) |
aSrcdoc | When INTERNAL_LOAD_FLAGS_IS_SRCDOC is set, the contents of this parameter will be loaded instead of aURI. |
aSourceDocShell | - The source browsing context for the navigation. |
aBaseURI | - The base URI to be used for the load. Set in srcdoc loads as it cannot otherwise be inferred in certain situations such as view-source. |
Do either a history.pushState() or history.replaceState() operation,
depending on the value of aReplace.
Creates a DocShellLoadInfo object that you can manipulate and then pass
to loadURI.
Reset state to a new content model within the current document and the document
viewer. Called by the document before initiating an out of band document.write().
For editors and suchlike who wish to change the URI associated with the
document. Note if you want to get the current URI, use the read-only
property on nsIWebNavigation.
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 as well.
isUnload | if true, fire the unload event in addition to the pagehide event. |
Presentation shell for the currently loaded document. This may be null.
Cancel the XPCOM timers for each meta-refresh URI in this docshell,
and this docshell’s children, recursively. The meta-refresh timers can be
restarted using resumeRefreshURIs(). If the timers are already suspended,
this has no effect.
Restart the XPCOM timers for each meta-refresh URI in this docshell,
and this docshell’s children, recursively. If the timers are already
running, this has no effect.
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.
Finish firing WebProgressListener notifications and DOM events for
restoring a page presentation. This should only be called via
beginRestore().
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.
aError | The error code to be displayed |
aURI | nsIURI of the page where the error happened |
aURL | wstring of the page where the error happened |
aFailedChannel | The channel related to this error |
Notification that entries have been removed from the beginning of a
nsSHistory which has this as its rootDocShell.
numEntries | - The number of entries removed |
Set the offset of this child in its container.
Disconnects this docshell’s editor from its window, and stores the
editor data in the open document’s session history entry. This
should be called only during page transitions.
Create a new about:blank document and content viewer.
aPrincipal | the principal to use for the new document. |
Called when the user chose an encoding override from the character
encoding menu. Separate from the setter for the charset property to avoid
extensions adding noise to the data.
In a child docshell, this is the charset of the parent docshell
Return a DOMHighResTimeStamp representing the number of
milliseconds from an arbitrary point in time. The reference
point is shared by all DocShells and is also used by timestamps
on markers.
Returns and flushes the profile timeline markers gathered by the docShell
Add an observer to the list of parties to be notified when this docshell’s
private browsing status is changed. |obs| must support weak references.
Add an observer to the list of parties to be notified when reflows are
occurring. |obs| must support weak references.
Remove an observer from the list of parties to be notified about reflows.
Notify all attached observers that a reflow has just occurred.
interruptible | if true, the reflow was interruptible. |
start | timestamp when reflow started, in milliseconds since navigationStart (accurate to 1/1000 of a ms) |
end | timestamp when reflow ended, in milliseconds since navigationStart (accurate to 1/1000 of a ms) |
Add an observer to the list of parties to be notified when scroll position
of some elements is changed.
Add an observer to the list of parties to be notified when scroll position
of some elements is changed.
Notify all attached observers that the scroll position of some element
has changed.
Indicate that this docshell corresponds to an app with the given app id.
You may pass NO_APP_ID or UNKNOWN_APP_ID for containingAppId. If you
pass NO_APP_ID, then this docshell will return NO_APP_ID for appId. If
you pass UNKNOWN_APP_ID, then this docshell will search its hiearchy for
an app frame and use that frame’s appId.
You can call this method more than once, but there’s no guarantee that
other components will update their view of the world if you change a
docshell’s app id, so tread lightly.
If you call this method after calling setIsBrowserInsideApp, this
docshell will forget the fact that it was a browser.
Indicate that this docshell corresponds to a browser inside an app with
the given ID. As with setIsApp, you may pass NO_APP_ID or
UNKNOWN_APP_ID.
As with setIsApp, you may call this more than once, but it’s kind of a
hack, so be careful.
Like nsIDocShellTreeItem::GetSameTypeParent, except this ignores <iframe mozbrowser> and <iframe mozapp> boundaries.
Returns true if we are sandboxed from aTargetDocShell.
aTargetDocShell - the browsing context we are attempting to navigate.
Checks whether the channel associated with the root docShell is equal to
mMixedContentChannel. If they are the same, allowMixedContent is set to true.
Checks if the root document has a secure connection. If it is, sets
rootHasSecureConnection to true. If the docShell is the root doc shell,
isRootDocShell is set to true.
Are plugins allowed in the current document loaded in this docshell ?
(if there is one). This depends on whether plugins are allowed by this
docshell itself or if the document is sandboxed and hence plugins should
not be allowed.
Make this docShell editable, setting a flag that causes
an editor to get created, either immediately, or after
a url has been loaded.
inWaitForUriLoad | true to wait for a URI before creating the editor. |
Get the SHEntry associated with a child docshell
Add a Child SHEntry for a frameset page, given the child’s loadtype.
If aCloneChildren is true, then aCloneReference’s children will be
cloned onto aHistoryEntry.
Removes nsISHEntry objects related to this docshell from session history.
Use this only with subdocuments, like iframes.
Returns false for mLSHE, true for mOSHE
Cherry picked parts of nsIController.
They are here, because we want to call these functions
from JS.
Invisible DocShell are dummy construct to simulate DOM windows
without any actual visual representation. They have to be marked
at construction time, to avoid any painting activity.
Get the script global for the document in this docshell.
Regarding setOpener / getOpener - We can’t use XPIDL’s “attribute”
for notxpcom, so we’re relegated to using explicit gets / sets. This
should be fine, considering that these methods should only ever be
called from native code.
See the documentation for setOpener and getOpener about why we
don’t use attribute here instead.
Presentation context for the currently loaded document. This may be null.
Presentation shell for the oldest document, if this docshell is
currently transitioning between documents.
Content Viewer that is currently loaded for this DocShell. This may
change as the underlying content changes.
This attribute allows chrome to tie in to handle DOM events that may
be of interest to chrome.
Whether to allow plugin execution
Whether to allow Javascript execution
Attribute stating if refresh based redirects can be allowed
Attribute stating if it should allow subframes (framesets/iframes) or not
Attribute stating whether or not images should be loaded.
Attribute stating whether or not media (audio/video) should be loaded.
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 that determines whether window control (move/resize) is allowed.
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.
certain dochshells (like the message pane)
should not throw up auth dialogs
because it can act as a password trojan
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.
The SecureBrowserUI object for this docshell. This is set by XUL