Created
May 31, 2012 13:20
-
-
Save typeofweb/2843386 to your computer and use it in GitHub Desktop.
Washing Machine Asynchronous Programming
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
(function(){ | |
let WashingMachine = createWashingMachineFromElement(this); | |
WashingMachine.addEventListener("ready", function(){ | |
WashingMachine.SetTemp(60, 'celcius', function(){ | |
WashingMachine.SetMode(MODE_NORMAL, function(){ | |
WashingMachine.Engage(function(){ | |
WashingMachine.StartWashing(); | |
}); | |
}); | |
}); | |
}, false); | |
}().bind(bathroom.querySelector('#washingMachine')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Error: washing machine not found
at bathroom:1:25
I think thi sis buggy code since the washing machine lives in the kitchen