mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
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
This commit is contained in:
parent
8d4e650a95
commit
e20cf1ac78
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue