Victor Victor - 1 year ago 106
Javascript Question

dojo cross browser compatibility

I recently posted a question on stackoverflow about the less popular js function

. For most browsers, it is not necessary to use this capture. The question and answers are here:

javascript :Object doesn't support this property or method

However, it was suggested to be absolutely safe, a dojo solution should be used to abstract away browser differences.

I found some dojo code samples on the web related to generic usage i.e. using dojo syntax to declare form inputs etc.
But is there an example to use dojo for this particular problem of
In short, how to do
in dojo. Is dojo suited for this particular problem case?

Answer Source

Dojo makes handling events very easy. If you wanted to capture mouse up event on the page as your other question seems to do, you would use:

dojo.connect( dojo.body(), 'mouseup', function( event ) { console.log( event ); } );

Replacing the function body with whatever functionality you need.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download