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:
Jürg Lehni 2016-01-31 22:47:57 +01:00
parent bc2729683c
commit 50843d8f87
2 changed files with 4 additions and 2 deletions

View file

@ -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": {

View file

@ -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'];