Created
November 21, 2011 21:26
-
-
Save ElemarJR/1383995 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE> | |
<html> | |
<head> | |
<title>Simple RX</title> | |
</head> | |
<body> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script> | |
<script src="rx.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
$(function () { | |
var observable = Rx.Observable.Range(0, 10); | |
var observer = observable.Subscribe( | |
function (e) { document.write("onNext: " + e + "<br/>"); }, /* onNext */ | |
function (e) { document.write("onNext: " + e + "<br/>"); }, /* onError */ | |
function () { document.write("OnCompleted") } /* onCompleted */ | |
); | |
observer.Dispose(); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment