Hi I am trying to extend prototype Event object by adding a new method, a very simple html file demonstrate what I was doing:
<html> <head> <script type="text/javascript" src=" http://prototypejs.org/assets/2009/8/31/prototype.js"></script> <title>A Simple Page</title> <script language="JavaScript"> <!-- Event.prototype.test = function() { //this line failed in IE8 alert(this.type); }; document.observe('dom:loaded', function() { $('body').observe('click', function(e) {e.test();}); }); --> </script> </head> <body id="body"> </body> </html> This file works fine in firefox and chrome, however it failed in IE8 with error message: 'Event.prototype' is null or not an object. Can someone help out? Thx, Green -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.