Created
July 9, 2014 05:22
-
-
Save trevorlinton/7effc61d7ca0c99b4cb7 to your computer and use it in GitHub Desktop.
Tint2 Web Browser Example
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
application.addEventListener('launch', function() { | |
var win = new Window(800,600); | |
win.title = "My web browser, probably should add a status bar..."; | |
var web = new WebView(win); | |
web.addEventListener('load', function() { | |
console.log('We may load this, unsure yet, nothing has been received but the request for: '+web.location); | |
}); | |
web.addEventListener('request', function() { | |
console.log('Weve received a request and may go parse it out, last chance to cancel.'); | |
}); | |
web.addEventListener('locationchange', function() { | |
console.log('The webviews location changed!'); | |
}); | |
web.addEventListener('loading', function() { | |
console.log('We received the request and are beginning to parse it.'); | |
}); | |
web.location = 'http://www.trueinteractions.com'; | |
win.appendChild(web); | |
}); | |
application.addEventListener('unload', function() { | |
console.log('leaving..'); | |
}); | |
application.launch(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment