mirror of
https://github.com/google/blockly.git
synced 2026-01-08 17:40:09 +01:00
feat: Improved procedure arg interaction. (#3527)
* feat: Improved procedure arg interaction. * Added docs. * Fixed typos and typings. * Fixed typings? * Changed visibility to private.
This commit is contained in:
committed by
alschmiedt
parent
267877115f
commit
6d1bb201f7
@@ -384,6 +384,21 @@ Blockly.VariableMap.prototype.getAllVariables = function() {
|
||||
return all_variables;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns all of the variable names of all types.
|
||||
* @return {!Array<string>} All of the variable names of all types.
|
||||
*/
|
||||
Blockly.VariableMap.prototype.getAllVariableNames = function() {
|
||||
var allNames = [];
|
||||
for (var key in this.variableMap_) {
|
||||
var variables = this.variableMap_[key];
|
||||
for (var i = 0, variable; (variable = variables[i]); i++) {
|
||||
allNames.push(variable.name);
|
||||
}
|
||||
}
|
||||
return allNames;
|
||||
};
|
||||
|
||||
/**
|
||||
* Find all the uses of a named variable.
|
||||
* @param {string} id ID of the variable to find.
|
||||
|
||||
Reference in New Issue
Block a user