Created
March 26, 2011 15:50
Titanium Desktop event listeners
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
<html> | |
<head></head> | |
<body style="background-color:#1c1c1c;margin:0"> | |
<div style="border-top:1px solid #404040"> | |
<div style="color:#fff;;padding:10px">Welcome to Titanium</div> | |
</div> | |
<script type="text/javascript"> | |
var eventName = 'randomEvent'; | |
Titanium.API.addEventListener(eventName, function() { | |
alert(eventName+' fired!'); | |
}); | |
Titanium.API.fireEvent(eventName); | |
Titanium.API.removeEventListener(eventName); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment