Fix for bug #8357; approved by chofmann@netscape.com; reviewed by don@netscape.com

This commit is contained in:
law%netscape.com 1999-06-18 00:39:43 +00:00
parent 73c6743dbb
commit dbcd4010aa
3 changed files with 11 additions and 11 deletions

View File

@ -20,6 +20,7 @@
var prefwindow = null;
var appCoreName = "";
var defaultStatus = "default status text";
var debugSecurity = false; // Set this true to enable Security chrome testing.
function Startup()
{
@ -695,19 +696,20 @@
}
function securityOn() {
// Set debugSecurity (at top of file) to turn this code on.
if ( !debugSecurity ) {
return;
}
var security = document.getElementById("Browser:Security");
if ( security.getAttribute("secure") == "false" ) {
security.setAttribute("secure","true");
// Temporary till onchange handlers work.
onSecurity();
}
}
function securityOff() {
var security = document.getElementById("Browser:Security");
if ( security.getAttribute("secure") == "true" ) {
security.setAttribute("secure","false");
// Temporary till onchange handlers work.
onSecurity();
}
}
function doTests() {

View File

@ -40,6 +40,7 @@ function onLoad() {
if ( !browser ) {
dump( "unable to get browser app core\n" );
toolkit.CloseWindow( window );
return;
}
/* Give input field the focus. */

View File

@ -1,13 +1,10 @@
var coreName;
function StartupViewSource() {
// Generate unique name.
coreName = "ViewSource." + ( new Date() ).getTime().toString();
// Generate unique name (var appCoreName declared in navigator.js).
appCoreName = "ViewSource." + ( new Date() ).getTime().toString();
// Create and initialize the browser app core.
appCore = new BrowserAppCore();
appCore.Init( coreName );
appCore.Init( appCoreName );
appCore.setContentWindow(window.frames[0]);
appCore.setWebShellWindow(window);
appCore.setToolbarWindow(window);
@ -16,5 +13,5 @@
var url = document.getElementById("args").getAttribute("value");
// Load the source (the app core will magically know what to do).
XPAppCoresManager.Find( coreName ).loadUrl(url);
appCore.loadUrl(url);
}