Swap order of arguments on domToWorkspace.

This commit is contained in:
Neil Fraser
2016-04-04 18:31:41 -07:00
parent 4ac1204550
commit 4e42a1b78e
17 changed files with 53 additions and 39 deletions

View File

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