- From: Bjoern Hoehrmann <derhoermi@gmx.net>
- Date: Thu, 16 Mar 2006 11:40:39 +0100
- To: Jonas Sicking <jonas@sicking.cc>
- Cc: Web APIs WG <public-webapi@w3.org>
* Jonas Sicking wrote: >I don't see a point in telling people not to use it. It's there and it's >never going to go away. So if people think it's practical, why not let >them use it. If I were to write a tutorial for this, I'd say that returning values from such scripts triggers confusing, non-interoperable HTML quirks in some implementations, don't do that... >So the resulting code would be something like: > >function(event) >{ > if (HTML_LISTENER.call(this, event) == > (event.type == "error" || event.type == "mouseover")) > event.preventDefault(); >} Note that some browsers allow to uncancel the event by returning other values as the event bubbles up the tree. And onerror="" is different from most other onfoo="" attributes, in Mozilla the script would be called with three arguments instead of one, and none of those arguments is an Event object, for example. -- Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de 68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
Received on Thursday, 16 March 2006 10:40:46 UTC