From 6bc4c2fb940377d61c00e56f1a57e8980e63301c Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 20 May 2019 13:53:54 +0300 Subject: [PATCH] added .events, still tihnking about propper event propagation... Signed-off-by: Alex A. Naanou --- ui (gen4)/lib/widget/browse2.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ui (gen4)/lib/widget/browse2.js b/ui (gen4)/lib/widget/browse2.js index 874b4ea1..850cd977 100755 --- a/ui (gen4)/lib/widget/browse2.js +++ b/ui (gen4)/lib/widget/browse2.js @@ -1767,8 +1767,6 @@ var BaseBrowserPrototype = { .render(options) }, - // XXX should these be moved to the HTML class... - // Events... // // Format: @@ -1961,6 +1959,18 @@ var BaseBrowserPrototype = { return this }, + // List events... + // XXX avoid expensive props... + get events(){ + var that = this + return Object.deepKeys(this) + .map(function(key){ + return (key != 'events' + && that[key] instanceof Function + && that[key].event) ? + that[key].event + : [] }) + .flat() }, // domain events/actions... // XXX need a way to extend these to: