/[meteor]/googlecode.com/svn/trunk/public_html/meteor.js
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /googlecode.com/svn/trunk/public_html/meteor.js

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 7 by andrew.betts, Thu Nov 23 15:53:25 2006 UTC revision 8 by andrew.betts, Thu Nov 23 16:35:37 2006 UTC
# Line 16  Function.prototype.andThen=function(g) { Line 16  Function.prototype.andThen=function(g) {
16                  f(a);g(args);                  f(a);g(args);
17          }          }
18  };  };
19    function addUnLoadEvent(func) {
20      var oldonunload = window.onunload;
21      if (typeof window.onunload != 'function') {
22        window.onunload = func;
23      } else {
24        window.onunload = function() {
25          if (oldonunload) {
26            oldonunload();
27          }
28          func();
29        }
30      }
31    }
32    addUnLoadEvent(meteordestroy);
33    function meteordestroy() {
34            var x = Meteor.instances.length;
35            for(var i=0; i<x; i++) {
36                    if (typeof(Meteor.instances[i].transferDoc)=="object") {
37                            Meteor.instances[i].transferDoc.open();
38                            Meteor.instances[i].transferDoc.close();
39                            delete Meteor.instances[i].transferDoc;
40                    }
41                    if (document.getElementById("meteorframe_"+Meteor.instances[i].instID)) {
42                            document.body.removeChild(document.getElementById("meteorframe_"+Meteor.instances[i].instID));
43                    }
44                    delete Meteor.instances[i];
45            }
46    }
47    
48  function Meteor(instID) {  function Meteor(instID) {
49    

Legend:
Removed from v.7  
changed lines
  Added in v.8

  ViewVC Help
Powered by ViewVC 1.1.26