mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -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,
|
||||
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);
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue