cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Mullins <dmullin...@gmail.com>
Subject Global Javascript in InAppBrowser
Date Tue, 29 Jan 2013 12:35:22 GMT
If I open a local file in the InAppBrowser, can it communicate via
javascript to the main application?

For instance, if index.html defines the global function doSomething
and opens local.html:

function doSomething(input) {
	alert('hello ' + input)
}

document.addEventListener("deviceready", onDeviceReady, false);

function onDeviceReady() {
	iabRef = window.open('local.html', '_blank', 'location=yes');
}

Can local.html call doSomething?
function init() {
  doSomething('child view');
}

I'm not having any success and want to make sure I'm not missing something.

Dan

Mime
View raw message