widgets: allow widgets to provide static funcs to the JS object