- Standalone UI event delegate implementation
- Provide multiple styles/modes: override, automatically preventDefault, partial matching, exact matching...
- SovietJS can either be viewed as an independent library, or as a part of OzJS mirco-framework.
- It's wrapped as an AMD (Asynchronous Module Definition) module. You should use it with oz.js (or require.js or similar for handling dependencies).
- If you want to make it available for both other AMD code and traditional code based on global namespace. OzJS provides a mini define/require implementation to transform AMD module into traditional module pattern.
- See http://ozjs.org for details.
Add to your project as new dependency
Or download directly from Github
- mo/lang/es5
- mo/lang/mix
- mo/lang/type
- mo/lang/struct
- dollar or other jQuery-compatible library
Under construction...
var soviet = require('soviet');
soviet(elm/*, options */)
--- options:
preventDefault
-- falsematchesSelector
-- falseautoOverride
-- falsealiasEvents
-- {}trace
-- falsetraceStack
-- null
- API:
on(event/*, selector */, handler)
--on(event, { 'selector': handler, ... })
--off(event, selector, handler)
--matches(event, selector)
--reset(event)
--disable(event, selector)
--enable(event, selector)
--trigger(ev)
--
- options:
soviet.Soviet
--
Under construction...
Copyright (c) 2010 - 2013 dexteryy
Licensed under the MIT license.