mirror of
https://github.com/google/blockly.git
synced 2026-01-07 09:00:11 +01:00
chore: Reduce delta on ports to blockly-samples (#6886)
* Reduce usage of obsolete .keyCode property.
* Rename private properties/methods which violate eslint rules.
* Use arrays of bound events rather than individual properties.
* Improve typing info.
* Also fix O(n^2) recursive performance issue in theme's getComponentStyle function.
* And replace String(...) with '${...}' (smaller, faster).
* .toString() is considered harmful.
This commit is contained in:
@@ -145,10 +145,7 @@ export function unbind(bindData: Data): (e: Event) => void {
|
||||
// should only pass Data from bind or conditionalBind.
|
||||
const callback = bindData[bindData.length - 1][2];
|
||||
while (bindData.length) {
|
||||
const bindDatum = bindData.pop();
|
||||
const node = bindDatum![0];
|
||||
const name = bindDatum![1];
|
||||
const func = bindDatum![2];
|
||||
const [node, name, func] = bindData.pop()!;
|
||||
node.removeEventListener(name, func, false);
|
||||
}
|
||||
return callback;
|
||||
|
||||
Reference in New Issue
Block a user