Side navigation
#13872 closed bug (notabug)
Opened May 09, 2013 04:21PM UTC
Closed May 09, 2013 04:29PM UTC
$(self.location).attr("href") fails in IEs
Reported by: | fzaitsev | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.9.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
as of 5/9/2013 running
javascript:$(location).attr("href")
in the address bar of IE browser at jquery.com throws exception.
The exception happens on the line 2631 of the non-minified version of jquery-1.9.1,
the function receives the self.location object as elem, and it doesn't have getAttribute method, thus failing.
// href/src property should get the full normalized URL (#10299/#12915)
jQuery.each([ "href", "src" ], function( i, name ) {
jQuery.propHooks[ name ] = {
get: function( elem ) {
return elem.getAttribute( name, 4 );
}
};
});
It may be arguable if this is a bug or improper use of the method .attr(), but I inherited the code that din't throw any such exceptions with jquery-1.6.1
Attachments (0)
Change History (1)
Changed May 09, 2013 04:29PM UTC by comment:1
resolution: | → notabug |
---|---|
status: | new → closed |