mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Made the getAttribute check more explicit - comment nodes don't have getAttribute in XUL documents. Fixes jQuery bug #3870.
This commit is contained in:
parent
2ff3e49279
commit
d1a34f7908
@ -703,7 +703,8 @@ try {
|
||||
|
||||
// Check to see if an attribute returns normalized href attributes
|
||||
div.innerHTML = "<a href='#'></a>";
|
||||
if ( div.firstChild && div.firstChild.getAttribute("href") !== "#" ) {
|
||||
if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
|
||||
div.firstChild.getAttribute("href") !== "#" ) {
|
||||
Expr.attrHandle.href = function(elem){
|
||||
return elem.getAttribute("href", 2);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user