Rxjs说,Rx.DOM是未定义的

时间:2015-09-15 23:12:09

标签: dom rxjs

我正在尝试简单的按键示例,

var input = document.getElementById('input');

var source = Rx.DOM.keypress(input);
var subscription = source.subscribe(
    function (x) {
        console.log('Next!');
    },
    function (err) {
        console.log('Error: ' + err);
    },
    function () {
        console.log('Completed');
    });

我在index.html中添加了rx.jsrx.binding.js。但它说,

Rx.DOM is undefined

我也没有在两个rx文件中看到DOM函数。

1 个答案:

答案 0 :(得分:2)

它是一个不同的扩展名https://github.com/Reactive-Extensions/RxJS-DOM