Hudkit core library. You probably don't want to use this directly.
Provides base functionality for
hudkit. Includes actions, widgets, root pane, styles, plus some housekeeping. You probably don't want to use this module directly - check out
Register a module with
hudkit is initialised. Hudkit modules are objects with two functions:
initialize(ctx): perform one-time module initialisation; this probably means registering a custom widget constructor by calling
ctx.registerWidget(name, ctor). Check out
attach(instance): set this module up to work with the given hudkit instance; the most common operation performed here is to install any stylesheets by calling
Initialise hudkit. Calls each registered module's
Create an instance of hudkit rooted on the given
window. Returns an
Instance object granting access to widget constructors, constants etc.
In addition to the following properties, every
Instance also contains a proxy method to each registered widget constructor e.g.
Create an action function for the given callback. See hudkit-action for documentation.
Dictionary of defined constants. Aliased to
Append CSS to this instance's
var hudkit = require('hudkit-core'); hudkit.register(require('my-widget-1')); hudkit.register(require('my-widget-2')); hudkit.init(); var hk = hudkit.instance();