var deps = [
    '/stdlib/tag.js',
    '/stdlib/observable.js'
];

function increment(x) {
    return String(parseInt(x, 10) + 1);
}

function onReady(tag, observable) {
    var value = observable.observe("0");

    function onChange(evt) {
       value.set(evt.target.value);
    }

    var input = tag.tag({
        name: 'input',
        attributes: {type: 'number', value: value},
        handlers: {keyup: onChange, change: onChange}
    });

    var inc = observable.lift(increment);
    var output = tag.tag({
        name: 'input',
        attributes: {type: 'number', value: inc(value), readOnly: true}
    });

    var div = tag.tag({name: 'div', contents: [input, output]});

    yoink.define(div);
}

yoink.require(deps, onReady);


@@ -209,80 +209,8 @@
 );%0A%0A
-    function onChange(evt) %7B%0A       value.set(evt.target.value);%0A    %7D%0A%0A
     
@@ -310,62 +310,8 @@
 e%7D,%0A
-        handlers: %7Bkeyup: onChange, change: onChange%7D%0A
     

Add 'change' event handler if tag attribute is an observable.