Created
June 16, 2014 16:01
-
-
Save michalbe/03afc883b77bb0b0398c 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
2 | |
<script src="bm.js"></script> | |
<script> | |
var mb = messageBroadcaster; | |
mb.on('elo', function(data){ | |
document.body.innerHTML += data; | |
}); | |
</script> | |
<button onclick="mb.fire('elo', 'yo2');">EMIT EVENT</button> |
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
2 | |
<script src="bm.js"></script> | |
<script> | |
var mb = messageBroadcaster; | |
mb.on('elo', function(data){ | |
document.body.innerHTML += data; | |
}); | |
</script> | |
<button onclick="mb.fire('elo', 'yo2');">EMIT EVENT</button> |
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
<style> | |
iframe { | |
width: 300px; | |
height: 300px; | |
border: 3px solid #f0f; | |
} | |
</style> | |
<script src="bm.js"></script> | |
<script> | |
var mb = messageBroadcaster; | |
mb.on('elo', function(data){ | |
document.body.innerHTML += data; | |
}); | |
</script> | |
<iframe src="1.html"></iframe> | |
<iframe src="2.html"></iframe> | |
<button onclick="mb.fire('elo', 'yo');">EMIT EVENT</button> | |
<br/><br/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment