On 10/20/06, Adam van den Hoven <[EMAIL PROTECTED]> wrote:
> if (e.target.nodeType == 3) { // defeat Safari bug
>        e.target = e.target.parentNode;
> }
>
> as I don't know whether or not some strange side effects might occur.
> I suspect not, but I was being cautious.

The target property is read-only
(http://www.w3.org/TR/DOM-Level-2-Events/ecma-script-binding.html). It
sucks that it would have to be under a different name to fix that
Safari bug.

Just a thought ... couldn't we create a new object (var newEvent = {})
and then extend it with the existing event object? Then the read-only
properties wouldn't be read-only and could be normalized for issues
like the Safari one.

--
Brandon Aaron

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to