diff options
author | id_ed25519_bbb.git <joak@nospace.at> | 2016-12-19 21:46:26 +0100 |
---|---|---|
committer | id_ed25519_bbb.git <joak@nospace.at> | 2016-12-19 21:46:26 +0100 |
commit | 8e8310fcf99275c2bc42ab3ec56f3ff5a8640505 (patch) | |
tree | 91d702c7f3bc83038313bef9498d5866fb4c3a01 /2016_lamp_browser/firefox-old/data/onoff.js | |
parent | 26b134161719ca19c5174c9f6524a13280684155 (diff) |
update lamp
Diffstat (limited to '2016_lamp_browser/firefox-old/data/onoff.js')
-rw-r--r-- | 2016_lamp_browser/firefox-old/data/onoff.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/2016_lamp_browser/firefox-old/data/onoff.js b/2016_lamp_browser/firefox-old/data/onoff.js new file mode 100644 index 0000000..378a724 --- /dev/null +++ b/2016_lamp_browser/firefox-old/data/onoff.js @@ -0,0 +1,11 @@ +var on = document.getElementById("on"); +var off = document.getElementById("off"); + +on.addEventListener('click', function(event) { + self.port.emit("lamp", "on"); +}, true); + +off.addEventListener('click', function() { + self.port.emit("lamp", "off"); +}, true); + |