mirror of
https://github.com/google/blockly.git
synced 2026-01-04 15:40:08 +01:00
Remove .children access
Not supported in node.js’ xmldom package.
This commit is contained in:
@@ -606,7 +606,10 @@ Blockly.Xml.domToBlock = function(xmlBlock, workspace) {
|
||||
* should be added.
|
||||
*/
|
||||
Blockly.Xml.domToVariables = function(xmlVariables, workspace) {
|
||||
for (var i = 0, xmlChild; xmlChild = xmlVariables.children[i]; i++) {
|
||||
for (var i = 0, xmlChild; xmlChild = xmlVariables.childNodes[i]; i++) {
|
||||
if (xmlChild.nodeType != Element.ELEMENT_NODE) {
|
||||
continue; // Skip text nodes.
|
||||
}
|
||||
var type = xmlChild.getAttribute('type');
|
||||
var id = xmlChild.getAttribute('id');
|
||||
var name = xmlChild.textContent;
|
||||
|
||||
Reference in New Issue
Block a user