Enable editor window to be opened via window.openDialog

git-svn-id: svn://10.0.0.236/trunk@47372 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
law%netscape.com
1999-09-14 20:36:19 +00:00
parent 34c122fe5b
commit 41c3b49c87
2 changed files with 15 additions and 0 deletions

View File

@@ -36,6 +36,7 @@
<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="EditorOnLoad()"
onunload="EditorShutdown()" title="&editorWindow.title;" align="vertical"
width="640" height="480">

View File

@@ -49,6 +49,20 @@ var gStyleTags = {
"underline" : "u"
};
function EditorOnLoad() {
// See if argument was passed.
if ( window.arguments && window.arguments[0] ) {
// Opened via window.openDialog with URL as argument.
// Put argument where EditorStartup expects it.
document.getElementById( "args" ).setAttribute( "value", window.arguments[0] );
// Continue with normal startup.
EditorStartup( 'html' );
return;
} else {
// No problem, proceed the old-fashioned way.
return;
}
}
function EditorStartup(editorType)
{