Skip to content

Instantly share code, notes, and snippets.

@codeboxed
Created March 26, 2011 15:50
Show Gist options
  • Select an option

  • Save codeboxed/888392 to your computer and use it in GitHub Desktop.

Select an option

Save codeboxed/888392 to your computer and use it in GitHub Desktop.

Revisions

  1. codeboxed created this gist Mar 26, 2011.
    19 changes: 19 additions & 0 deletions index.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    <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>