luci-base: cbi.js: add heuristics to attribute handling in E()
If a given attribute value is a function, register it as event listener,
if it is an object, filter it through JSON.stringify(), else set it
as-is.
This helps to reduce some boiler-plate code when building DOM structures.
Signed-off-by:
Jo-Philipp Wich <jo@mein.io>
parent
9b20f7ac
Please register or sign in to comment