--- googlecode.com/svn/trunk/public_html/meteor.js 2006/11/23 15:53:25 7 +++ googlecode.com/svn/trunk/public_html/meteor.js 2006/12/08 16:52:58 9 @@ -16,6 +16,27 @@ f(a);g(args); } }; +function addUnLoadEvent(func) { + var oldonunload = window.onunload; + if (typeof window.onunload != 'function') { + window.onunload = func; + } else { + window.onunload = function() { + if (oldonunload) { + oldonunload(); + } + func(); + } + } +} +//addUnLoadEvent(meteordestroy); +function meteordestroy() { + var x = Meteor.instances.length; + for(var i=0; i this.lastmsgreceived) { this.callback_process(data); if (id != -1) this.lastmsgreceived = id; @@ -206,6 +224,9 @@ this.ping(); } this.setstatus(5); + if (!isNaN(timestamp)) { + Meteor.setServerTime(timestamp); + } } Meteor.prototype.ping = function() {