Side navigation
#7500 closed bug (fixed)
Opened November 13, 2010 01:36PM UTC
Closed December 06, 2010 10:03PM UTC
Last modified May 08, 2011 05:38PM UTC
attr() fails for non DOM element nodes
Reported by: | jitter | Owned by: | jitter |
---|---|---|---|
Priority: | blocker | Milestone: | 1.5 |
Component: | attributes | Version: | 1.4.4 |
Keywords: | regression attr non DOM element | Cc: | |
Blocked by: | Blocking: |
Description
With the changes for 1.4.3 a regression was introduced which prevented the use of attr()
on anything but DOM element nodes (where nodeType
is 1) see #7451 and the fix in 1.4.4 commit #a64dc0
But now attr(name)
and attr(name, value)
fails in various circumstances.
test case switch from version 1.4.2 to 1.4.3 to 1.4.4 to see how the behavior changed from working, to partially working to breaking with exceptions.
Attachments (0)
Change History (20)
Changed November 13, 2010 01:52PM UTC by comment:1
_comment0: | [https://github.com/jquery/jquery/pull/92 pull request] → 1289656419350596 |
---|
Changed November 13, 2010 02:12PM UTC by comment:2
component: | unfiled → attributes |
---|---|
keywords: | → attr non DOM element nodes |
priority: | undecided → low |
status: | new → open |
Changed November 13, 2010 08:40PM UTC by comment:3
keywords: | attr non DOM element nodes → regression attr non DOM element |
---|
Changed November 14, 2010 04:36PM UTC by comment:4
milestone: | 1.5 → 1.4.5 |
---|---|
priority: | low → blocker |
Addy, I'm gonna change this to a blocker until we get a consensus on the behaviour regression.
Changed November 20, 2010 06:28PM UTC by comment:8
owner: | → jitter |
---|---|
status: | open → pending |
Changed November 21, 2010 09:50PM UTC by comment:9
status: | pending → open |
---|
Why pending?
Changed November 21, 2010 10:04PM UTC by comment:10
@jitter - weird, I don't remember doing that at all... But check this out: I DID post this... 28 hours ago: http://bugs.jquery.com/ticket/7582
Changed November 21, 2010 10:28PM UTC by comment:11
status: | open → assigned |
---|
Changed November 21, 2010 10:29PM UTC by comment:12
Changed November 22, 2010 11:22AM UTC by comment:13
#7591 is a duplicate of this ticket.
Changed November 23, 2010 02:47AM UTC by comment:14
#7605 is a duplicate of this ticket.
Changed November 30, 2010 09:52PM UTC by comment:15
#7665 is a duplicate of this ticket.
Changed December 01, 2010 02:39PM UTC by comment:16
#7503 is a duplicate of this ticket.
Changed December 06, 2010 10:03PM UTC by comment:17
resolution: | → fixed |
---|---|
status: | assigned → closed |
Landed
Changed January 14, 2011 10:20PM UTC by comment:18
milestone: | 1.4.5 → 1.5 |
---|
Move fixed tickets to appropriate milestone
Changed May 08, 2011 05:32PM UTC by comment:19
The bug reappeared again
1.5.2: everything ok
1.6.0: Getting attribute foo failed for node of type plainjsobject elem.getAttribute is not a function
Changed May 08, 2011 05:38PM UTC by comment:20
As the docs for http://api.jquery.com/attr states, do not use attr on the document or plain objects. http://api.jquery.com/prop will work instead, but for the document I suggest attaching data with http://api.jquery.com/data unless property manipulation is necessary.
pull request
There is much noise from whitespace changes use diff -w to see the what's really going on