Found this website jsbin.com for testing output of code. All thanks to this tutorial to create a simple push message and log it on your browser developer tool setting. Love it when code works
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<p id="hello">hello world</p>
<script src="http://js.pusher.com/2.1/pusher.min.js"> </script>
<script>
Pusher.log=function(msg){
console.log(msg);
}
var pusher = new Pusher('Your_api_key');
pusher.connection.bind('connected',connected);
function connected(){
document.getElementById('hello').innerText='CONNECTED';
}
</script>
</body>
</html>
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.