зеркало из https://github.com/mozilla/pjs.git
59 строки
2.4 KiB
HTML
59 строки
2.4 KiB
HTML
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=x-user-defined">
|
|
<meta name="GENERATOR" content="Mozilla/4.7 [en] (WinNT; U) [Netscape]">
|
|
<title> MfcEmbed JavaScript Tests </title>
|
|
<script language="JavaScript">
|
|
|
|
// Open a window with default size/style
|
|
function ShowWin()
|
|
{
|
|
window.open("http://www.mozilla.org", "theWin1");
|
|
}
|
|
|
|
// Open a window with specific size
|
|
function ShowWinSpecificSize()
|
|
{
|
|
window.open("http://www.mozilla.org", "theWin2", "width=400, height=600");
|
|
}
|
|
|
|
// Open a window with chrome + specific size
|
|
function ShowWinSpecificSizeWithChrome()
|
|
{
|
|
window.open("http://www.mozilla.org", "theWin3", "menubar=yes, toolbar=yes, status=yes, resizable=yes, width=400, height=600");
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
|
|
<h1>
|
|
Excercising MfcEmbed's Interfaces</h1>
|
|
This test page serves as a testbed to execercise some of the interfaces
|
|
MfcEmbed implements - such as nsIWebBrowserChrome, nsIPrompt etc.
|
|
<p>You can test these by loading mfcembed in the debugger and setting breakpoints
|
|
in the interface methods discussed below. Then clicking on these links
|
|
will break in the debugger at the specified locations for you to explore
|
|
these interface implementations further.
|
|
<p><a href="javascript:ShowWin()">Open a simple JavaScript window with
|
|
defaults for size etc:</a>
|
|
<blockquote><font size=-1>Invokes <i>nsIWebBrowserChrome::CreateBrowserWindow()</i>
|
|
to create the window</font></blockquote>
|
|
<a href="javascript:ShowWinSpecificSize()">Open a JavaScript window with
|
|
only its size specified (Not Resizable)</a>
|
|
<blockquote><font size=-1>Invokes <i>nsIWebBrowserChrome::CreateBrowserWindow()</i>
|
|
to create the window and also invokes <i>nsIWebBrowserChrome::SizeBrowserTo()</i>
|
|
to set the window size. This also shows how we handle the chromeMask to
|
|
make the window non-resizeable</font></blockquote>
|
|
<a href="javascript:ShowWinSpecificSizeWithChrome()">Open a window with
|
|
chrome and its size specified (Resizable)</a>
|
|
<blockquote><font size=-1>Invokes <i>nsIWebBrowserChrome::CreateBrowserWindow()</i>
|
|
to create the window and also invokes <i>nsIWebBrowserChrome::SizeBrowserTo()</i>
|
|
to set the window size</font>
|
|
<br><font size=-1>All of the above tests also invoke<i> nsIWebBrowserChrome::FindNamedBrowserItem()</i>
|
|
to find the named target window in the JavaScript code.</font></blockquote>
|
|
|
|
</body>
|
|
</html>
|