# HG changeset patch # User Edouard Tisserant # Date 1653465082 -7200 # Node ID 5f417d3c2d035c7cc1a7ce312416b444be9ad141 # Parent 32eaba9cf30e3420d62802d8f5530d3165a58f16 SVGHMI: Add forEach to local copy of pythonic.js diff -r 32eaba9cf30e -r 5f417d3c2d03 svghmi/pythonic.js --- a/svghmi/pythonic.js Wed May 11 12:12:16 2022 +0200 +++ b/svghmi/pythonic.js Wed May 25 09:51:22 2022 +0200 @@ -37,6 +37,12 @@ } } + forEach(callback) { + for (const element of this) { + callback(element); + } + } + map(callback) { const result = []; for (const element of this) {