mirror of
https://github.com/google/blockly.git
synced 2026-01-07 00:50:27 +01:00
Swap order of arguments on domToWorkspace.
This commit is contained in:
@@ -139,11 +139,11 @@ Code.loadBlocks = function(defaultXml) {
|
||||
// Language switching stores the blocks during the reload.
|
||||
delete window.sessionStorage.loadOnceBlocks;
|
||||
var xml = Blockly.Xml.textToDom(loadOnce);
|
||||
Blockly.Xml.domToWorkspace(Code.workspace, xml);
|
||||
Blockly.Xml.domToWorkspace(xml, Code.workspace);
|
||||
} else if (defaultXml) {
|
||||
// Load the editor with default starting blocks.
|
||||
var xml = Blockly.Xml.textToDom(defaultXml);
|
||||
Blockly.Xml.domToWorkspace(Code.workspace, xml);
|
||||
Blockly.Xml.domToWorkspace(xml, Code.workspace);
|
||||
} else if ('BlocklyStorage' in window) {
|
||||
// Restore saved blocks in a separate thread so that subsequent
|
||||
// initialization is not affected from a failed load.
|
||||
@@ -270,7 +270,7 @@ Code.tabClick = function(clickedName) {
|
||||
}
|
||||
if (xmlDom) {
|
||||
Code.workspace.clear();
|
||||
Blockly.Xml.domToWorkspace(Code.workspace, xmlDom);
|
||||
Blockly.Xml.domToWorkspace(xmlDom, Code.workspace);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user