Currently, I am utilizing Reactive Extension DOM to listen for events from the DOM. Below is a snippet of my code:
var input = document.getElementById('test_id');
var source = Rx.DOM.change(input);
var subscription = source.subscribe(
function (x) {
console.log(x);
},
function (err) {
console.log('Error: ' + err);
},
function () {
console.log('Completed');
});
The issue arises when test_id
element is not present on the page upon completion of the document.ready
event. In my case, the appearance of test_id
is dependent on an AJAX request. How can I configure RxDom to handle this delayed notification?
Your assistance is greatly appreciated.