Mozilla/mozilla/suite/browser/viewsource.js
matt%netscape.com 2769bdcc9f Adding content for chrome directory
git-svn-id: svn://10.0.0.236/trunk@37899 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-01 22:56:04 +00:00

18 lines
638 B
JavaScript

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);
}