On Mon, Sep 20, 2010 at 8:50 PM, Biju <[email protected]> wrote: > On Mon, Sep 20, 2010 at 11:37 PM, Jonas Sicking <[email protected]> wrote: >> >> if (onhashchange in document.body) { >> ... >> } > > assuming > if ('onhashchange' in document.body) { > > That should solve one issue, but Firefox is not doing that for all events, > > example:- 'onbeforeunload' in window ===> gives false > > also there is no way to discover the all the available events for a node.
Indeed, in general we have very poor handling of on* properties. Our code for dealing with that needs a rewrite. But my point was that I think the spec already might have a mechanism for dealing with what you are asking for. So we should encourage implementations to implement the spec properly, rather than adding other mechanisms and hoping that browsers get those more right. / Jonas
