这里是我的代码:的PhoneGap构建+科尔多瓦+ ChildBrowser错误
<script src="include/cordova.js" type="text/javascript"></script> <script src="include/sencha-touch-all.js" type="text/javascript"></script> <script type="text/javascript" charset="utf-8" src="include/childbrowser.js"></script> <link href="include/sencha-touch.css" rel="stylesheet" type="text/css" />
var childBrowser = null;
if (navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry)/)) {
document.addEventListener("deviceready", onDeviceReady, false);
} else {
onDeviceReady();
}
function onDeviceReady(){
console.log("PhoneGap is Ready");
childBrowser = ChildBrowser.install();
}
function openChildBrowser(url)
{
try {
//both of these should work...
var cb = new ChildBrowser();
console.log(cb);
cb.showWebPage('http://www.google.com');
}
catch (err)
{
alert(err);
console.log(err);
}
}
...
有一些更多的代码是无关,但是当我打电话openChildBrowser()
我收到以下错误:
Uncaught TypeError: Object #<Object> has no method 'exec'
我认为这是参考childbrowser调用exec cordova
对象。
当我看cordvoa
对象我没有看到exec
功能的任何地方......
任何想法?
有趣的想法 - 虽然我不这样做我的知识。 – sirmdawg 2012-04-26 15:02:36