Skip to content
This repository was archived by the owner on Apr 20, 2018. It is now read-only.

Commit 7bd695a

Browse files
Using mutation observer scheduler
1 parent b8746fa commit 7bd695a

File tree

4 files changed

+62
-2
lines changed

4 files changed

+62
-2
lines changed

examples/Autocomplete/Autocomplete.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020
<h1>RxJS for jQuery Bindings AutoComplete example</h1>
2121
<p class="lead">Example to show combining input events such as keyup with Ajax requests</p>
2222
</div>
23-
<div class="row-fluid">
23+
<div class="row">
2424
<form role="form">
2525
<div class="form-group">
2626
<label for="textInput">Enter Query for Wikipedia</label>
2727
<input type="text" id="textInput" class="form-control" placeholder="Enter Query...">
2828
</div>
2929
</form>
3030
</div>
31-
<div class="row-fluid">
31+
<div class="row">
3232
<ul id="results"></ul>
3333
</div>
3434
</div>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta http-equiv="X-UA-Compatible" content="IE=edge" >
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<meta charset="utf-8">
7+
<meta name="description" content="">
8+
<meta name="author" content="">
9+
<title>Rx for JavaScript Rocks!</title>
10+
<link rel="stylesheet" href="../vendor/bootstrap-3.2.0/css/bootstrap.min.css">
11+
<!--[if lt IE 9]>
12+
<script src="../vendor/html5shiv-3.7.2/html5shiv.min.js"></script>
13+
<script src="../vendor/respond-1.4.2/respond.min.js"></script>
14+
<![endif]-->
15+
</head>
16+
17+
<body>
18+
<div id="textContainer"></div>
19+
<div class="container">
20+
<div class="page-header">
21+
<h1>Mutation Observer Scheduler Example</h1>
22+
<p class="lead">Example to show using the Mutation Observer scheduler</p>
23+
</div>
24+
<div class="row">
25+
<ul id="results"></ul>
26+
</div>
27+
</div>
28+
<!--[if lt IE 9]>
29+
<script src="../../node_modules/rx/dist/rx.lite.compat.js"></script>
30+
<![endif]-->
31+
<!--[if gte IE 9]><!-->
32+
<script src="../../node_modules/rx/dist/rx.lite.js"></script>
33+
<!--<![endif]-->
34+
<script src="../../dist/rx.dom.js"></script>
35+
<script src="mutationobserverscheduler.js"></script>
36+
</body>
37+
</html>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
(function (window, undefined) {
2+
3+
function clearChildren (e) {
4+
while (e.firstChild) { e.removeChild(e.firstChild); }
5+
}
6+
7+
function main() {
8+
var ul = document.getElementById('results');
9+
10+
Rx.Observable.range(0, 10, Rx.Scheduler.mutationObserver)
11+
.subscribe(function (results) {
12+
var li = document.createElement('li');
13+
li.innerHTML = results;
14+
ul.appendChild(li);
15+
});
16+
}
17+
18+
window.onload = main;
19+
20+
}(window));

rx.dom.node.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
var Rx = require('rx');
2+
require('./dist/rx.dom');
3+
module.exports = Rx;

0 commit comments

Comments
 (0)