This article needs a technical review. How you can help.
nsISupports
Last changed in Gecko 10.0 (Firefox 10.0 / Thunderbird 10.0 / SeaMonkey 2.7)Implemented by: ?????????????????????????????????????
. To create an instance, use:
var contentViewer = Components.classes["@mozilla.org/????????????????????????????"] .createInstance(Components.interfaces.nsIContentViewer);
Method overview
void clearHistoryEntry(); |
void close(in nsISHEntry historyEntry); |
void destroy(); |
[noscript,notxpcom,nostdcall] nsIViewPtr findContainerView(); |
void getBounds(in nsIntRectRef aBounds); Native code only! |
[noscript,notxpcom] nsIDocumentPtr getDocument(); |
void hide(); |
void init(in nsIWidgetPtr aParentWidget, [const] in nsIntRectRef aBounds); Native code only! |
void loadComplete(in unsigned long aStatus); |
void loadStart(in nsISupports aDoc); |
void move(in long aX, in long aY); |
void open(in nsISupports aState, in nsISHEntry aSHEntry); |
void pageHide(in boolean isUnload); |
boolean permitUnload([optional] in boolean aCallerClosesWindow); |
boolean requestWindowClose(); |
void resetCloseWindow(); |
void setBounds([const] in nsIntRectRef aBounds); Native code only! |
void setDocumentInternal(in nsIDocumentPtr aDocument, in boolean aForceReuseInnerWindow); Native code only! |
[noscript,notxpcom,nostdcall] void setNavigationTiming(in nsDOMNavigationTimingPtr aTiming); |
void setPageMode(in boolean aPageMode, in nsIPrintSettings aPrintSettings); |
void show(); |
void stop(); |
void unload(); Obsolete since Gecko 1.8 |
Attributes
Attribute | Type | Description |
container |
|
|
DOMDocument |
|
|
enableRendering |
boolean |
Obsolete since Gecko 2.0 |
historyEntry |
|
Get the history entry that this viewer will save itself into when destroyed. Can return null . Read only. |
isTabModalPromptAllowed |
boolean |
Read only. |
presContext |
nsPresContextPtr |
Read only. Native code only!
Note: Prior to Gecko 10.0 (Firefox 10.0 / Thunderbird 10.0 / SeaMonkey 2.7), this attribute was part of
nsIDocumentViewer . |
presShell |
|
Read only. Native code only!
Note: Prior to Gecko 10.0 (Firefox 10.0 / Thunderbird 10.0 / SeaMonkey 2.7), this attribute was part of
nsIDocumentViewer . |
previousViewer |
|
The previous content viewer, which has been closed but not destroyed. Native code only! |
sticky |
boolean |
Methods
clearHistoryEntry()
Clears the current history entry. This is used to clear out the saved presentation state.
void clearHistoryEntry();
Parameters
None.
close()
All users of a content viewer are responsible for calling both close()
and destroy()
, in that order.
close()
should be called when the load of a new page for the next content viewer begins, and destroy()
should be called when the next content viewer replaces this one.
void close( in nsISHEntry historyEntry );
Parameters
-
historyEntry
-
The session history entry for the content viewer. If this is
null
, thendestroy()
will be called on the document byclose()
. If it is non-null
, the document will not be destroyed, and the following actions will happen whendestroy()
is called:Sanitize()
will be called on the viewer's document- The content viewer will set the
contentViewer
property on the history entry, and release its reference (ownership reversal). Hide()
will be called, and no further destruction will happen.
destroy()
void destroy();
Parameters
None.
findContainerView()
Finds the view to use as the container
view for MakeWindow.
nsIDocumentViewer
.[noscript,notxpcom,nostdcall] nsIViewPtr findContainerView();
Parameters
None.
Return value
The container view, or null
if this content viewer is the root of a view manager hierarchy.
null
), and mParentWidget
is also null
, then this document should not even be displayed.getBounds
void getBounds( in nsIntRectRef aBounds );
Parameters
-
aBounds
- Missing Description
getDocument()
Returns the DOM document object (as an nsIDocument
without addrefing.
[noscript,notxpcom] nsIDocumentPtr getDocument();
Parameters
None.
Return value
The DOM document object.
hide()
void hide();
Parameters
None.
init
Initializes the content viewer.
void init( in nsIWidgetPtr aParentWidget, [const] in nsIntRectRef aBounds );
Parameters
-
aParentWidget
- Missing Description
-
aBounds
- Missing Description
loadComplete()
void loadComplete( in unsigned long aStatus );
Parameters
-
aStatus
- Missing Description
Exceptions thrown
-
Missing Exception
- Missing Description
loadStart()
void loadStart( in nsISupports aDoc );
Parameters
-
aDoc
- Missing Description
Exceptions thrown
-
Missing Exception
- Missing Description
move()
void move( in long aX, in long aY );
Parameters
-
aX
- Missing Description
-
aY
- Missing Description
open()
Attaches the content viewer to its DOM window and docshell.
void open( in nsISupports aState, in nsISHEntry aSHEntry );
Parameters
-
aState
- A state object that might be useful in attaching the DOM window.
-
aSHEntry
- The history entry that the content viewer was stored in. The entry must have the docshells for all of the child documents stored in its child shell list.
pageHide()
void pageHide( in boolean isUnload );
Parameters
-
isUnload
- Missing Description
Exceptions thrown
-
Missing Exception
- Missing Description
permitUnload()
Determins whether or not the document wants to prevent unloading by firing beforeunload
on the document, and if it does, prompts the user. The result is returned.
boolean permitUnload(
in boolean aCallerClosesWindow Optional
);
Parameters
-
aCallerClosesWindow
Optional -
Indicates that the current caller will
close()
the window. If the method returnstrue
, all subsequent calls will be ignored.
Return value
true
if the document will allow unloading; otherwise false
.
requestWindowClose()
boolean requestWindowClose();
Parameters
None.
Return value
Missing Description
Exceptions thrown
-
Missing Exception
- Missing Description
resetCloseWindow()
Works in tandem with permitUnload()
, if the caller decides not to close()
the window it indicated it will, it is the caller's responsibility to reset that with this method.
void resetCloseWindow();
Parameters
None.
Exceptions thrown
-
Missing Exception
- Missing Description
setBounds
void setBounds( [const] in nsIntRectRef aBounds );
Parameters
-
aBounds
- Missing Description
setDocumentInternal
nsIDocumentViewer
.void setDocumentInternal( in nsIDocumentPtr aDocument, in boolean aForceReuseInnerWindow );
Parameters
-
aDocument
- Missing Description
-
aForceReuseInnerWindow
- Missing Description
setNavigationTiming()
Set collector for navigation timing data (load
and unload
events).
[noscript,notxpcom,nostdcall] void setNavigationTiming( in nsDOMNavigationTimingPtr aTiming );
Parameters
-
aTiming
- Missing Description
Return value
Missing Description
setPageMode()
void setPageMode( in boolean aPageMode, in nsIPrintSettings aPrintSettings );
Parameters
-
aPageMode
- Missing Description
-
aPrintSettings
- Missing Description
show()
void show();
Parameters
None.
stop()
void stop();
Parameters
None.
unload()
void unload();
Parameters
None.