Skip to content

Instantly share code, notes, and snippets.

@alunny
Created April 10, 2012 23:52
Show Gist options
  • Save alunny/2355750 to your computer and use it in GitHub Desktop.
Save alunny/2355750 to your computer and use it in GitHub Desktop.
simple simple child browser example
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"
id = "com.alunny.chilling"
version = "1.0.0">
<name>ChildBrowser on 1.5.0</name>
<feature name="http://plugins.phonegap.com/ChildBrowser/2.0.1" />
<feature name="http://api.phonegap.com/1.0/network" />
<preference name="phonegap-version" value="1.7.0" />
</widget>
<html>
<head></head>
<body>
<h1>Child Browser Demo</h1>
<a onClick="launchBrowser()" href="#">What does it do?</a>
</body>
<script src="phonegap.js"></script>
<script src="childbrowser.js"></script>
<script>
function launchBrowser() {
alert((window.plugins.childBrowser != undefined) + " should be true")
window.plugins.childBrowser.showWebPage('http://www.phonegap.com',
{ showLocationBar: true });
}
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment