Side navigation
#9469 closed feature (fixed)
Opened May 31, 2011 04:12PM UTC
Closed October 25, 2012 02:37AM UTC
Remove semi-functional .selector calculation from .pushStack()
Reported by: | dmethvin | Owned by: | dmethvin |
---|---|---|---|
Priority: | low | Milestone: | 1.9 |
Component: | core | Version: | 1.6.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Per discussion with ben_alman, and related to #7389 which consensus says won't happen.
The .selector
property can't be reliable since there are simple ways to construct a set that can't be represented by a CSS selector. We've documented those shortcomings in the API docs for .live()
and .selector
but it's still a frequent source of questions and errors.
It would simplify the code for .pushStack()
and its callers if it didn't try to maintain the .selector
property at all, which is still in keeping with our documented use of .live()
immediately after a $()
set creation.
In addition we should deprecate non-core use of .selector
and remove the documentation from the API site eventually.
All to be done over several versions, with sufficient advance warning in the docs before breaking anything.
Attachments (0)
Change History (9)
Changed May 31, 2011 04:15PM UTC by comment:1
component: | unfiled → core |
---|---|
priority: | undecided → low |
status: | new → open |
Changed May 31, 2011 05:37PM UTC by comment:2
See my 3rd idea here: https://gist.github.com/1000934
Changed July 12, 2011 06:42PM UTC by comment:3
resolution: | → invalid |
---|---|
status: | open → closed |
Eventually we should do this, for sure, but only when we have some alternative to switch to. Right now we're using .selector inside jQuery for live so we definitely want to maintain it.
Changed May 23, 2012 12:51PM UTC by comment:4
A quick question:
Since .selector
seems to have been removed from the docs, and .live
doesn't support chaining, would it be possible to remove the .selector
constructing code in .pushStack
now?
Changed May 23, 2012 06:00PM UTC by comment:5
resolution: | invalid |
---|---|
status: | closed → reopened |
Hmmm, it might. We still need to set .selector
since .live()
needs it, but the only other chaining I've seen in the wild is $(sel).find(sel).live()
. Reopening to take a look around.
Changed May 29, 2012 12:13AM UTC by comment:6
status: | reopened → open |
---|
Changed June 26, 2012 03:07PM UTC by comment:7
milestone: | 1.next → 1.9 |
---|---|
owner: | → dmethvin |
status: | open → assigned |
Changed September 09, 2012 01:10AM UTC by comment:8
type: | enhancement → feature |
---|
Bulk change from enhancement to feature.