change initial jsdom declaration

This commit is contained in:
Asturur 2016-12-06 09:59:49 +01:00
parent 549ea1776b
commit 44b9e7e520

View file

@ -14,7 +14,9 @@ if (typeof document !== 'undefined' && typeof window !== 'undefined') {
else {
// assume we're running under node.js when document/window are not present
fabric.document = require("jsdom")
.jsdom("<!DOCTYPE html><html><head></head><body></body></html>");
.jsdom(
decodeURIComponent("%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead%3E%3C%2Fhead%3E%3Cbody%3E%3C%2Fbody%3E%3C%2Fhtml%3E")
);
if (fabric.document.createWindow) {
fabric.window = fabric.document.createWindow();