mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -05:00
Use DOMParser to handle SVG strings.
This commit is contained in:
parent
ee3fa3b00f
commit
aa757e1d7b
1 changed files with 2 additions and 0 deletions
|
@ -449,6 +449,8 @@ new function() {
|
|||
}
|
||||
|
||||
function importSVG(node, clearDefs) {
|
||||
if (typeof node === 'string')
|
||||
node = new DOMParser().parseFromString(node, 'image/svg+xml');
|
||||
// jsdom in Node.js uses uppercase values for nodeName...
|
||||
var type = node.nodeName.toLowerCase(),
|
||||
importer = importers[type],
|
||||
|
|
Loading…
Reference in a new issue