On Tuesday, June 01, 2010 11:00:31 you wrote: [snip] > var eventCatcher = { > run: function(){ > dojo.body().onclick = function(e){ > e = e || window.event; // event: W3C or MSIE > var t = e.target || e.srcElement; // target: W3C or MSIE > > switch (t){ // t received the delegation > default: > break; > } > } > } > 1 } window.onload = eventCatcher.run; > 2 }; window.onload = eventCatcher.run; > 3 } window.onload = eventCatcher.run(); > 4 }; window.onload = eventCatcher.run(); > > Look at the 4 variations of that last line. > > Firefox: 1-4 work; > Chrome: 2 and 4 work; > Galeon: 3 and 4 work; > Only version 4 works on all 3 browsers. > > Whose bug is that? Yours. :-) The assignment statement must be terminated with a semicolon. The call of a function must be explicit with the `()'. But I get the point. Firebug is indispensable. By the way, have you looked at Jquery? $(document).ready(function () { $(dojo.body).click(function(e) { var t = e.target; ... }); }); just works -- all browsers. -- Garry T. Williams --- +1 678 656-4579 -- users mailing list users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines