Last active
November 25, 2015 13:53
-
-
Save mebjas/ba54a91472f89b5d165b to your computer and use it in GitHub Desktop.
This file contains 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
<script src="https://cdn.socket.io/socket.io-1.3.7.js"></script> | |
<script src="./client/socket.notification.js"></script> | |
<script> | |
var n = new notification({url: 'http://127.0.0.1:8090'}); | |
n.bind({ | |
channel: 'test', | |
message: function(data) { | |
if (typeof data.hello != 'undefined') return; | |
document.body.innerHTML += ' <div> New Message: ' +JSON.stringify(data.data) +'</div>'; | |
} | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment