// Call Behaviour.apply() to re-apply the rules (if you
// update the dom, etc).
...
...
@@ -37,9 +33,37 @@
*/
varstorage={};
varBehaviour={
/**
* @param {String} selector a CSS selector triggering your behavior
* @param {String} id uniquely identifies this behavior among all behaviors for the selector; prevents duplicate registrations
* @param {Number} priority relative position of this behavior in case multiple apply; lower numbers applied first; alphabetical by id in case of tie; choose 0 if you do not care
* @param {Function} behavior callback function taking one parameter, a (DOM) {@link Element}, and returning void