diff options
| -rw-r--r-- | src/jqLite.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/jqLite.js b/src/jqLite.js index a59ba6c2..b607c095 100644 --- a/src/jqLite.js +++ b/src/jqLite.js @@ -206,8 +206,9 @@ JQLite.prototype = { } else if (isDefined(value)) { e.setAttribute(name, value); } else { - // the extra argument is to get the right thing for a.href in IE, see jQuery code - return e.getAttribute(name, 2); + // the extra argument "2" is to get the right thing for a.href in IE, see jQuery code + // some elements (e.g. Document) don't have get attribute, so return undefined + if (e.getAttribute) return e.getAttribute(name, 2); } }, |
