mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
21 lines
568 B
JavaScript
21 lines
568 B
JavaScript
function onLoadViewSource() {
|
|
// Create and initialize the browser instance.
|
|
createBrowserInstance();
|
|
|
|
if ( appCore ) {
|
|
appCore.isViewSource = true;
|
|
appCore.setContentWindow(window.frames[0]);
|
|
appCore.setWebShellWindow(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 );
|
|
} else {
|
|
// Give up.
|
|
alert( "Error creating browser instance\n" );
|
|
}
|
|
|
|
}
|