Created
April 25, 2015 12:22
-
-
Save makevoid/e86c46e5fb9f0264b376 to your computer and use it in GitHub Desktop.
custom_events.js - example usage (comments in ita)
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
| // var event = new CustomEvent('nome',{ | |
| // 'detail': { | |
| // 'flange': 2, | |
| // 'foo': 1 | |
| // } | |
| //}) | |
| setInterval(function() { // loop | |
| var rand = parseInt(Math.random() * 1000) | |
| var event = new CustomEvent('flanged', { | |
| 'detail': { flange: rand } | |
| }) | |
| document.querySelector("body").dispatchEvent(event); | |
| // console.log("evento lanciato") | |
| }, 1000); | |
| document.querySelector("body").addEventListener('flanged', function(event) { | |
| console.log("evento:", event.detail) | |
| document.querySelector("body").innerHTML = document.querySelector("body").innerHTML +event.detail.flange+ " " | |
| }) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@xoen flange
https://jsfiddle.net/ecguhpb4/
gltail cmq era in ruby: https://github.com/Fudge/gltail
questa e' una private key x chi la vuole svuotare:
5f8c90845530678d38cbb216abbb444cc85e5d12dd7149161866b6c62e6a2cd7
wif: KzRSox1PNWdgmWmxQtgzqbvmJ3nosYyPkaCpETHzTr1tRLgenHjq