fix: style attribute for xml in ws factory (#7554)

This commit is contained in:
Maribeth Bottorff
2023-09-28 15:21:26 -07:00
committed by GitHub
parent cc47c3a8af
commit ca4fa7e4fb

View File

@@ -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;
};