diff --git a/src/svg/SvgElement.js b/src/svg/SvgElement.js index a5d665cd..007c406f 100644 --- a/src/svg/SvgElement.js +++ b/src/svg/SvgElement.js @@ -25,6 +25,7 @@ var SvgElement = new function() { href: xlink, xlink: xmlns, xmlns: xmlns, + // IE needs the xmlns namespace when setting 'xmlns:xlink'. See #984 'xmlns:xlink': xmlns }; @@ -47,6 +48,7 @@ var SvgElement = new function() { if (typeof value === 'number' && formatter) value = formatter.number(value); if (namespace) { + // IE needs trailing slashes, but only when setting. See #984 node.setAttributeNS(namespace + '/', name, value); } else { node.setAttribute(name, value); diff --git a/test/tests/SvgImport.js b/test/tests/SvgImport.js index 933c4bc9..670eadc5 100644 --- a/test/tests/SvgImport.js +++ b/test/tests/SvgImport.js @@ -145,7 +145,8 @@ function importSVG(assert, url, message, options) { onError: function(error) { var ok = !!(options && options.expectError); QUnit.push(ok, false, !ok, ok && message - || 'Loading SVG from a valid URL should not give an error.'); + || 'Loading SVG from a valid URL should not give an error: ' + + error); done(); } });