~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

Viewing changes to mozilla/extensions/xmlterm/ui/content/XMLTermChrome.js

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// XMLTerm Chrome Commands
 
2
 
 
3
function StartupXMLTerm() {
 
4
   //dump("StartupXMLTerm:"+window.frames.length+"\n");
 
5
   //dump("StartupXMLTerm:"+window.frames[0].name+"\n");
 
6
 
 
7
   if (window.frames.length == 2) {
 
8
      xmltwin = window.frames[1];
 
9
      xmltwin.xmltbrowser = window.frames[0];
 
10
   } else {
 
11
      xmltwin = window.frames[0];
 
12
   }
 
13
 
 
14
   // Determine telnet URL, if any, from query portion of chrome URL
 
15
   // For security reasons, only the protocol/host portion of the URL should be
 
16
   // used to open a new connection
 
17
   var url = "";
 
18
   if (document.location.search) {
 
19
      url = document.location.search.substr(1);
 
20
   }
 
21
   //dump("StartupXMLterm: URL="+url+"\n");
 
22
 
 
23
   //dump("StartupXMLterm: WINDOW.ARGUMENTS="+window.arguments+"\n");
 
24
 
 
25
   dump("Trying to make an XMLTerm Shell through the component manager...\n");
 
26
 
 
27
   var xmltshell = Components.classes["@mozilla.org/xmlterm/xmltermshell;1"].createInstance();
 
28
 
 
29
   xmltshell = xmltshell.QueryInterface(Components.interfaces.mozIXMLTermShell);
 
30
   //dump("Interface xmltshell2 = " + xmltshell + "\n");
 
31
 
 
32
   if (!xmltshell) {
 
33
     dump("Failed to create XMLTerm shell\n");
 
34
     window.close();
 
35
     return;
 
36
   }
 
37
  
 
38
   // Store the XMLTerm shell in current window and in the XMLTerm frame
 
39
   window.xmlterm = xmltshell;
 
40
   xmltwin.xmlterm = xmltshell;
 
41
 
 
42
  if (window.arguments != null)
 
43
     window.title = "xmlterm: "+window.arguments;
 
44
 
 
45
   // Initialize XMLTerm shell in content window with argvals
 
46
   window.xmlterm.init(xmltwin, "", window.arguments);
 
47
}