Hi,

I want to extend the Object with some methods, like getClass(),
equals(), compare(), etc. Here is an example implementation:

Object.implement({
   getClass : function() {
      var constructorName = this.constructor.toString();
      return constructorName.match( /function (\w+)\(.+/ )[1];
   }
});

This code runs fine in FireFox, Chrome, but fails in IE. After a long
debugging I found that the issue is related to:

// IE purge
if (window.attachEvent && !window.addEventListener)
window.addListener('unload', function(){
        Object.each(collected, clean);
        if (window.CollectGarbage) CollectGarbage();
});

The concrete error : "attached[events].keys is null" in
removeEvents(); in line: 4062 of mootools-core-1.3.js

Please let me know how can I overcome on this problem.

Thanks,
Zsolt

Reply via email to