... | ... | @@ -19,9 +19,9 @@ An action is a Javascript function that is called when the action |
|
|
is executed. It receives the node and a parameter object::
|
|
|
|
|
|
```js
|
|
|
kss.registerActionProvider('replaceInnerHTML', function(node, params) {
|
|
|
node.innerHTML = params.html;
|
|
|
});
|
|
|
kss.registerActionProvider('replaceInnerHTML', function(node, params) {
|
|
|
node.innerHTML = params.html;
|
|
|
});
|
|
|
```
|
|
|
|
|
|
Creating a parameter provider
|
... | ... | @@ -31,9 +31,9 @@ A parameter provider is a Javascript function that is called for each |
|
|
parameter for an action. It receives the node and all arguments::
|
|
|
|
|
|
```js
|
|
|
kss.registerParameterProvider('nodeAttr', function(node, name) {
|
|
|
return node.getAttribute(name);
|
|
|
});
|
|
|
kss.registerParameterProvider('nodeAttr', function(node, name) {
|
|
|
return node.getAttribute(name);
|
|
|
});
|
|
|
```
|
|
|
|
|
|
Creating a custom event binder
|
... | ... | |