Opened 12 years ago
Closed 10 years ago
#9469 closed feature (fixed)
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.
Change History (9)
comment:1 Changed 12 years ago by
Component: | unfiled → core |
---|---|
Priority: | undecided → low |
Status: | new → open |
comment:2 Changed 12 years ago by
comment:3 Changed 12 years ago by
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.
comment:4 Changed 11 years ago by
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?
comment:5 Changed 11 years ago by
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.
comment:6 Changed 11 years ago by
Status: | reopened → open |
---|
comment:7 Changed 11 years ago by
Milestone: | 1.next → 1.9 |
---|---|
Owner: | set to dmethvin |
Status: | open → assigned |
comment:8 Changed 10 years ago by
Type: | enhancement → feature |
---|
Bulk change from enhancement to feature.
comment:9 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fix #9469. Remove semi-functional .selector property. Close gh-1006.
Saved 65 bytes.
Changeset: 69e2f068fe7d16c1ccd6cb99c6376f0d8891ea33
See my 3rd idea here: https://gist.github.com/1000934