Commit d1a34f79 authored by John Resig's avatar John Resig

Made the getAttribute check more explicit - comment nodes don't have...

Made the getAttribute check more explicit - comment nodes don't have getAttribute in XUL documents. Fixes jQuery bug #3870.
parent 2ff3e492
...@@ -703,7 +703,8 @@ try { ...@@ -703,7 +703,8 @@ try {
// Check to see if an attribute returns normalized href attributes // Check to see if an attribute returns normalized href attributes
div.innerHTML = "<a href='#'></a>"; 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){ Expr.attrHandle.href = function(elem){
return elem.getAttribute("href", 2); return elem.getAttribute("href", 2);
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment