Brandon Aaron schrieb:
> 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.
>   
That sounds reasonable. I'm trying to document the discussion here: 
http://jquery.com/dev/bugs/bug/109/

While we are at it: How about adding a data property to the event 
object, to solve this: http://jquery.com/dev/bugs/bug/202/

It would then look like this.

clickHandler = function(event) {
  // use event.data to access [1, 2, 3]
}
$("a").bind("click", clickHandler, [1, 2, 3]);

-- Jörn

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

Reply via email to