mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
SVG: Add comments explaining IE related changes in #984
This commit is contained in:
parent
acb1e408d0
commit
50bd5bee6f
2 changed files with 4 additions and 1 deletions
|
@ -25,6 +25,7 @@ var SvgElement = new function() {
|
||||||
href: xlink,
|
href: xlink,
|
||||||
xlink: xmlns,
|
xlink: xmlns,
|
||||||
xmlns: xmlns,
|
xmlns: xmlns,
|
||||||
|
// IE needs the xmlns namespace when setting 'xmlns:xlink'. See #984
|
||||||
'xmlns:xlink': xmlns
|
'xmlns:xlink': xmlns
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -47,6 +48,7 @@ var SvgElement = new function() {
|
||||||
if (typeof value === 'number' && formatter)
|
if (typeof value === 'number' && formatter)
|
||||||
value = formatter.number(value);
|
value = formatter.number(value);
|
||||||
if (namespace) {
|
if (namespace) {
|
||||||
|
// IE needs trailing slashes, but only when setting. See #984
|
||||||
node.setAttributeNS(namespace + '/', name, value);
|
node.setAttributeNS(namespace + '/', name, value);
|
||||||
} else {
|
} else {
|
||||||
node.setAttribute(name, value);
|
node.setAttribute(name, value);
|
||||||
|
|
|
@ -145,7 +145,8 @@ function importSVG(assert, url, message, options) {
|
||||||
onError: function(error) {
|
onError: function(error) {
|
||||||
var ok = !!(options && options.expectError);
|
var ok = !!(options && options.expectError);
|
||||||
QUnit.push(ok, false, !ok, ok && message
|
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();
|
done();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue