【发布时间】:2012-02-06 05:54:10
【问题描述】:
在黑莓的剧本中,正常的 window.history.back 不起作用。在模拟器上测试....
所以,我在 index.html 中尝试了这个
window.history.back = navigator.app.backHistory;
这将控制Phonegap函数,但在运行时它会抛出一个错误:
"Error: Status=2 Message=Class App cannot be found"
这里是Phonegap(1.4.1)函数:
/**
* Navigate back in the browser history.
*/
App.prototype.backHistory = function() {
// window.history.back() behaves oddly on BlackBerry, so use
// native implementation.
console.log("in backHistory");
PhoneGap.exec(null, null, "App", "backHistory", []);
};
有什么线索吗?
【问题讨论】:
标签: cordova blackberry browser-history blackberry-playbook