Bug Tracker

Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#9228 closed bug (wontfix)

I can't get 'tagName' attribute from version 1.6.

Reported by: kormandk@… Owned by:
Priority: low Milestone: 1.6.1
Component: attributes Version: 1.6
Keywords: Cc:
Blocked by: Blocking:

Description

I can't get 'tagName' attribute from version 1.6.

when i trace, '$('#tagID').attr('tagName') is undefined.'

but I can get tagName of $('#tagID').attr('tagName') from version 1.5.2.

I hope that I receive your respond ASAP.

thanks.

Change History (4)

comment:1 Changed 9 years ago by addyosmani

Component: unfiledattributes
Keywords: needsreview added
Priority: undecidedlow
Status: newopen

Thanks for submitting a ticket to the jQuery project. .attr('tagName') doesn't appear to have been documented as working, however I see in this test case http://jsfiddle.net/SjdcX/3/ that it was behaving as mentioned in your ticket all the way back to jQuery 1.3.2. As such this is a regression.

I'll leave this open so that another member of the team can review.

comment:2 Changed 9 years ago by timmywil

Keywords: needsreview removed
Milestone: 1.next1.6.1
Resolution: wontfix
Status: openclosed

The new http://api.jquery.com/prop method should be used to retrieve tagName since tagName is not an attribute, but a property. This may have worked with attr in the past, but was not supported.

comment:3 in reply to:  2 Changed 8 years ago by anonymous

Replying to timmywil:

The new http://api.jquery.com/prop method should be used to retrieve tagName since tagName is not an attribute, but a property. This may have worked with attr in the past, but was not supported.

According to your 1.6.1 release notes there is no change of the functionality of the attr method between 1.5.2 and 1.6.1. This is not true based on the resolution to this ticket. You should update your release notes for 1.6.1 letting people know that there is in fact a difference. attr("tagName") will not give you the same results in 1.5.2 as it does in 1.6.1. People should be informed so they can update their code.

comment:4 Changed 8 years ago by anonymous

tagName

Note: See TracTickets for help on using tickets.