Skip to content

Commit

Permalink
Fixing namespace detection for Internet Explorer 8 and making it more…
Browse files Browse the repository at this point in the history
… robust for other browsers as well.
  • Loading branch information
Szaby Grünwald committed Nov 30, 2011
1 parent 6cc19ef commit 6443e3d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/service/RdfaService.js
Expand Up @@ -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)) {
Expand Down

0 comments on commit 6443e3d

Please sign in to comment.