mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -05:00
Node: Switch to jsdom v8.0.1 with patched-in image support.
And fix XMLSerializer#serializeToString() to work with it.
This commit is contained in:
parent
bc2729683c
commit
50843d8f87
2 changed files with 4 additions and 2 deletions
|
@ -29,7 +29,7 @@
|
|||
"node": ">=0.10.0 <6.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"jsdom": "git://github.com/lehni/jsdom.git#3d55789d0f4d55392721b1e22890837fde472375",
|
||||
"jsdom": "git://github.com/lehni/jsdom.git#bd86dd16666241edd5f25bc4f4e144f24da3c889",
|
||||
"source-map-support": "^0.4.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
|
|
|
@ -32,7 +32,9 @@ function XMLSerializer() {
|
|||
}
|
||||
|
||||
XMLSerializer.prototype.serializeToString = function(node) {
|
||||
var text = jsdom.serializeDocument(node);
|
||||
if (!node)
|
||||
return '';
|
||||
var text = node.outerHTML;
|
||||
// Fix a jsdom issue where all SVG tagNames are lowercased:
|
||||
// https://github.com/tmpvar/jsdom/issues/620
|
||||
var tagNames = ['linearGradient', 'radialGradient', 'clipPath', 'textPath'];
|
||||
|
|
Loading…
Reference in a new issue