SVG: Add comments explaining IE related changes in #984

This commit is contained in:
Jürg Lehni 2016-02-20 00:19:36 +01:00
parent acb1e408d0
commit 50bd5bee6f
2 changed files with 4 additions and 1 deletions

View file

@ -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);

View file

@ -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();
}
});