From 17b4278ca21d6f70b6c9a29b6cdce27c1568bbc0 Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 23 Aug 2021 10:21:51 -0600 Subject: [PATCH] Implement iterateOver for children --- api/js/etemplate/Et2Widget.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/api/js/etemplate/Et2Widget.ts b/api/js/etemplate/Et2Widget.ts index 6f25f79f6a..4f3f563423 100644 --- a/api/js/etemplate/Et2Widget.ts +++ b/api/js/etemplate/Et2Widget.ts @@ -427,7 +427,21 @@ export const Et2Widget = >(superClass : T) => { _callback.call(_context, this); } - // TODO: children + + // Webcomponent children + for(let child of Array.from(this.children)) + { + if(typeof child.iterateOver == "function") + { + child.iterateOver(_callback, _context, _type); + } + } + + // Legacy children + for(let i = 0; i < this._legacy_children.length; i++) + { + this._legacy_children[i].iterateOver(_callback, _context, _type); + } } /**