From e20cf1ac78810c8953d41b665a5f66c58e1c0628 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 19 May 2020 21:29:49 +0200 Subject: [PATCH] environment: Replace monkey-patched method with Symbol.iterator This allows using the actor itself as iterator: for (let child of container) doStuff(child); https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1269 --- js/ui/environment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/environment.js b/js/ui/environment.js index 44a92db36..a0b884eb3 100644 --- a/js/ui/environment.js +++ b/js/ui/environment.js @@ -285,7 +285,7 @@ function init() { _easeActorProperty(this, 'value', target, params); }; - Clutter.Actor.prototype.iterate_children = function* () { + Clutter.Actor.prototype[Symbol.iterator] = function* () { for (let c = this.get_first_child(); c; c = c.get_next_sibling()) yield c; };