experimenting with iteration...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2019-08-22 15:45:06 +03:00
parent 8079465018
commit d47af07fd9

View File

@ -1916,6 +1916,18 @@ var BaseBrowserPrototype = {
return false },
// XXX EXPERIMENTAL -- an attempt to simplify walking...
walk2: function(func, options){
return this.items
.map(function(elem){
return elem instanceof BaseBrowser ?
: elem instanceof BaseItem ?
: elem.children ?
: elem
})
.flat() },
// Data access and iteration...
// Walk the browser...