Skip to content

Commit

Permalink
Added some sample code to accompany my checkin
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse MacFadyen committed Sep 14, 2010
1 parent 744f6de commit 846fa63
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions ChildBrowser/iPhone/README.txt
Expand Up @@ -31,6 +31,42 @@ Sept 13, 2010
( This should allow easy additions for facebook connect as you can monitor the browser's address and respond accordingly. )
+ added images to the XIB, these need to be attached as resources in your xcode project.

Sample use:

<code>
var root = this;

/* When this function is called, PhoneGap has been initialized and is ready to roll */
function onDeviceReady()
{
var cb = ChildBrowser.install();
if(cb != null)
{
cb.onLocationChange = function(loc){ root.locChanged(loc); };
cb.onClose = function(){root.onCloseBrowser()};
cb.onOpenExternal = function(){root.onOpenExternal();};

window.plugins.childBrowser.showWebPage("http://google.com");

}
}

function onCloseBrowser()
{
alert("In index.html child browser closed");
}

function locChanged(loc)
{
alert("In index.html new loc = " + loc);
}

function onOpenExternal()
{
alert("In index.html onOpenExternal");
}
</code>




0 comments on commit 846fa63

Please sign in to comment.