tag
jon
is for delegating all type user event , such as click,mousedown,keydown etc
as attribute
1 <ANY
2 jon="eventtype:fn">
3 ...
4 </ANY>
@eventtpe:@fn
Example JSFiddle
{{ msg }}
1 <div scope="spec.jon">
2 <input type="text" jon="keydown:ctrl(msg)" jbind="msg" />
3 <p>{{ msg }}</p>
4 </div>
1 define('spec.jon', function (exports,require,module) {
2 exports = module.exports = function () {
3 me = this;
4 this.ctrl = function (event, data) {
5 if (event.keyCode == 13) {
6 me.msg = 'hello world';
7 }
8 }
9 };
10 });