From ca4fa7e4fb75b0f9ae8b1d878a2b18354ed5a82f Mon Sep 17 00:00:00 2001 From: Maribeth Bottorff Date: Thu, 28 Sep 2023 15:21:26 -0700 Subject: [PATCH] fix: style attribute for xml in ws factory (#7554) --- demos/blockfactory/workspacefactory/wfactory_generator.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demos/blockfactory/workspacefactory/wfactory_generator.js b/demos/blockfactory/workspacefactory/wfactory_generator.js index 9f115c40b24..ca1a47b090e 100644 --- a/demos/blockfactory/workspacefactory/wfactory_generator.js +++ b/demos/blockfactory/workspacefactory/wfactory_generator.js @@ -45,7 +45,7 @@ WorkspaceFactoryGenerator.prototype.generateToolboxXml = function() { // Create DOM for XML. var xmlDom = Blockly.utils.xml.createElement('xml'); xmlDom.id = 'toolbox'; - xmlDom.style.display = 'none'; + xmlDom.setAttribute('style', 'display: none'); if (!this.model.hasElements()) { // Toolbox has no categories. Use XML directly from workspace. @@ -111,7 +111,7 @@ WorkspaceFactoryGenerator.prototype.generateWorkspaceXml = function() { // Generate XML and set attributes. var xmlDom = Blockly.Xml.workspaceToDom(this.hiddenWorkspace); xmlDom.id = 'workspaceBlocks'; - xmlDom.style.display = 'none'; + xmlDom.setAttribute('style', 'display: none'); return xmlDom; };