Permalink
Browse files

Fixing namespace detection for Internet Explorer 8 and making it more…

… robust for other browsers as well.
  • Loading branch information...
1 parent 6cc19ef commit 6443e3dc48c2d7dd411c51543d76b0841311f793 Szaby Grünwald committed Nov 30, 2011
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/service/RdfaService.js
View
7 src/service/RdfaService.js
@@ -415,11 +415,12 @@ VIE.prototype.RdfaService.prototype = {
} else {
$elem = jQuery(elem);
}
-
+ // Collect namespace definitions from the element and its parents
+ $elem = $elem.add($elem.parents());
var obj = {};
-
+
$elem.each(function (i, e) {
- if (e.attributes && e.attributes.getNamedItemNS) {
+ if (e.attributes) {
for (i = 0; i < e.attributes.length; i += 1) {
var attr = e.attributes[i];
if (/^xmlns(:(.+))?$/.test(attr.nodeName)) {

0 comments on commit 6443e3d

Please sign in to comment.