Cleanup so it can be used with window.openDialog

This commit is contained in:
law%netscape.com 1999-09-02 04:08:22 +00:00
Родитель a051d3cf9a
Коммит fce383f6b6
4 изменённых файлов: 82 добавлений и 32 удалений

Просмотреть файл

@ -5,6 +5,7 @@
<!DOCTYPE window SYSTEM "chrome://navigator/locale/viewSource.dtd" >
<window id="main-window" xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="onLoadViewSource()"
onunload="Shutdown()"
title="&mainWindow.title;" titlemodifier="&mainWindow.titlemodifier;"
titleseperator ="&mainWindow.titlemodifierseperator;" windowtype="navigator:viewsource"

Просмотреть файл

@ -1,17 +1,41 @@
function StartupViewSource() {
// 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( appCoreName );
appCore.setContentWindow(window.frames[0]);
appCore.setWebShellWindow(window);
appCore.setToolbarWindow(window);
// Get url whose source to view.
var url = document.getElementById("args").getAttribute("value");
// Load the source (the app core will magically know what to do).
appCore.loadUrl(url);
function onLoadViewSource() {
if ( !useOldAppCore ) {
StartupViewSource();
}
}
function StartupViewSource() {
if ( useOldAppCore ) {
// 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( appCoreName );
appCore.setContentWindow(window.frames[0]);
appCore.setWebShellWindow(window);
appCore.setToolbarWindow(window);
// Get url whose source to view.
var url = document.getElementById("args").getAttribute("value");
// Load the source (the app core will magically know what to do).
appCore.loadUrl(url);
} else {
// Create and initialize the browser instance.
createBrowserInstance();
if ( appCore ) {
appCore.isViewSource = true;
appCore.setContentWindow(window.frames[0]);
appCore.setWebShellWindow(window);
appCore.setToolbarWindow(window);
}
// Get url whose source to view.
var url = window.arguments[0];
// Load the source (the app core will magically know what to do).
appCore.loadUrl( url );
}
}

Просмотреть файл

@ -5,6 +5,7 @@
<!DOCTYPE window SYSTEM "chrome://navigator/locale/viewSource.dtd" >
<window id="main-window" xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="onLoadViewSource()"
onunload="Shutdown()"
title="&mainWindow.title;" titlemodifier="&mainWindow.titlemodifier;"
titleseperator ="&mainWindow.titlemodifierseperator;" windowtype="navigator:viewsource"

Просмотреть файл

@ -1,17 +1,41 @@
function StartupViewSource() {
// 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( appCoreName );
appCore.setContentWindow(window.frames[0]);
appCore.setWebShellWindow(window);
appCore.setToolbarWindow(window);
// Get url whose source to view.
var url = document.getElementById("args").getAttribute("value");
// Load the source (the app core will magically know what to do).
appCore.loadUrl(url);
function onLoadViewSource() {
if ( !useOldAppCore ) {
StartupViewSource();
}
}
function StartupViewSource() {
if ( useOldAppCore ) {
// 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( appCoreName );
appCore.setContentWindow(window.frames[0]);
appCore.setWebShellWindow(window);
appCore.setToolbarWindow(window);
// Get url whose source to view.
var url = document.getElementById("args").getAttribute("value");
// Load the source (the app core will magically know what to do).
appCore.loadUrl(url);
} else {
// Create and initialize the browser instance.
createBrowserInstance();
if ( appCore ) {
appCore.isViewSource = true;
appCore.setContentWindow(window.frames[0]);
appCore.setWebShellWindow(window);
appCore.setToolbarWindow(window);
}
// Get url whose source to view.
var url = window.arguments[0];
// Load the source (the app core will magically know what to do).
appCore.loadUrl( url );
}
}