Re: Chromium by default?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux