Bug Tracker

Changes between Version 1 and Version 2 of Ticket #7930, comment 2


Ignore:
Timestamp:
Jan 10, 2011, 9:59:38 AM (11 years ago)
Author:
jitter
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #7930, comment 2

    v1 v2  
    55!isClick && target && jQuery.acceptData( target ) ) {
    66}}}
    7 This is better readable, uses acceptData instead repeating the very same thing in the conditional. It also has the nice side effect of fixing a potential other bug: that this branch gets run even when target is e.g. undefined.
     7This is better readable, uses acceptData instead of repeating the very same thing in the conditional. It also has the nice side effect of fixing a potential other bug: that this branch gets run even when target is e.g. undefined.
    88
    9 So when you tackle this I guess you could do some refactoring and save us a few bytes, as there are at least two other places where a similar pattern (along `elem && elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]`) is used which (I guess) can be switch to using acceptData() too. (Maybe even incorporate the check if elem is defined/undefined into the acceptData too?)
     9So when you tackle this I guess you could do some refactoring and save us a few bytes, as there are at least two other places where a similar pattern (along `elem && elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]`) is used. These can probably be switched to use acceptData() too. Maybe we even can incorporate the check if elem is defined/undefined into acceptData() too?
    1010
    1111Replying to [comment:1 dmethvin]: