mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +00:00
jqlite should not generate exceptions when accessing attributes on Document
This commit is contained in:
parent
0144fa1ca9
commit
f0fb4a3928
1 changed files with 3 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue