Bug Tracker

Opened 6 years ago

Closed 6 years ago

#7964 closed enhancement (fixed)

Some traversal methods perform an unnecessary uniqueness check

Reported by: scottgonzalez Owned by: scott_gonzalez
Priority: low Milestone: 1.5
Component: traversing Version: 1.4.4
Keywords: Cc: jeresig
Blocked by: Blocking:


Methods like .children(), .next() and .prev() are guaranteed to produce a unique result when called on a unique set. These methods are generated by a function which always checks for uniqueness if the original set contained more than one element. Methods that are guaranteed to produce a unique result should not go through the uniqueness check as this is fairly expensive in some browsers.

Change History (2)

comment:1 Changed 6 years ago by addyosmani

  • Cc jeresig added
  • Owner set to scott_gonzalez
  • Priority changed from undecided to low
  • Status changed from new to assigned

comment:2 Changed 6 years ago by john

  • Component changed from unfiled to traversing
  • Milestone changed from 1.next to 1.5
  • Resolution set to fixed
  • Status changed from assigned to closed

This pull request was landed: https://github.com/jquery/jquery/pull/180

Note: See TracTickets for help on using tickets.