context: function OnLoadPrintEngine(){  gContent = document.getElementById("content") ;  if ( window.arguments && window.arguments[0] != null ) {    HTMLViewFunction =  window.arguments[0] ;    HTMLFunctionArgs =  window.arguments[1] ;    gMyTitle = window.arguments[2] ;    gShowprivate = window.arguments[3] ;    gArgs = window.arguments[4] ;    gCalendarWindow = window.arguments[5] ;    eventSource=gArgs.eventSource;    weeksInView=gArgs.weeksInView;    prevWeeksInView=gArgs.prevWeeksInView;    startOfWeek=gArgs.startOfWeek;    gHtmlDocument = window.content.document;    gHtmlString = "";    initHTMLView();    eval(HTMLViewFunction)(HTMLFunctionArgs);    finishHTMLView() ;    // Fail-safe check to not init twoce, to prevent leaking files    if (!gTempFile) {      const nsIFile = Components.interfaces.nsIFile;      var dirService = Components.classes["@mozilla.org/file/directory_service;1"]                                 .getService(Components.interfaces.nsIProperties);      gTempFile = dirService.get("TmpD", nsIFile);      gTempFile.append("calendarPrint.html");      gTempFile.createUnique(nsIFile.NORMAL_FILE_TYPE, 0600);      dump("tf: "+gTempFile.path+"\n");      var ioService = Components.classes["@mozilla.org/network/io-service;1"]                                .getService(Components.interfaces.nsIIOService);      var gTempUri = ioService.newFileURI(gTempFile);     }    var stream = Components.classes["@mozilla.org/network/file-output-stream;1"]                              .createInstance(Components.interfaces.nsIFileOutputStream);    // 0x2A = MODE_WRONLY | MODE_CREATE | MODE_TRUNCATE    stream.init(gTempFile, 0x2A, 0600, 0);    stream.write(gHtmlString, gHtmlString.length);       gHtmlDocument.location.href = gTempUri.spec;  }  BrowserPrintPreview();}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/c81cec73a2c12963eec1a9086fdbc0203448a914/calPrintEngine.js/clean/calendar/resources/content/calPrintEngine.js