From b4b496fb4148cd2abc4e84692b245490f85f2e40 Mon Sep 17 00:00:00 2001 From: alschmiedt Date: Mon, 12 Apr 2021 15:15:03 -0700 Subject: [PATCH] Reverts #4573 --- package.json | 2 +- scripts/package/node/core.js | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index c7e8eb500d5..b1491d69c05 100644 --- a/package.json +++ b/package.json @@ -92,6 +92,6 @@ "yargs": "^16.0.3" }, "dependencies": { - "jsdom": "16.5.2" + "jsdom": "15.2.1" } } diff --git a/scripts/package/node/core.js b/scripts/package/node/core.js index 70e1f9078fb..8f7745304be 100644 --- a/scripts/package/node/core.js +++ b/scripts/package/node/core.js @@ -23,10 +23,8 @@ Blockly.setLocale = function (locale) { // Override textToDomDocument and provide Node.js alternatives to DOMParser and // XMLSerializer. if (typeof Blockly.utils.global.document !== 'object') { - var JSDOM = require('jsdom').JSDOM; - var dom = new JSDOM(); - Blockly.utils.global.DOMParser = dom.window.DOMParser; - Blockly.utils.global.XMLSerializer = dom.window.XMLSerializer; + Blockly.utils.global.DOMParser = require("jsdom/lib/jsdom/living").DOMParser; + Blockly.utils.global.XMLSerializer = require("jsdom/lib/jsdom/living").XMLSerializer; var doc = Blockly.utils.xml.textToDomDocument( ''); Blockly.utils.xml.document = function() {