1
下面的代码来自PhoneGap 3.0生成的index.js,我的问题是为什么它不能让我们像往常一样使用this.receivedEvent(并将事件对象作为参数)。为什么在onDeviceReady中这是不是像往常一样?
// The scope of 'this' is the event. In order to call the 'receivedEvent'
// function, we must explicity call 'app.receivedEvent(...);'
onDeviceReady: function() {
app.receivedEvent('deviceready');
},
感谢,
我知道这一点,我的问题是index.js的情况下,其中的PhoneGap告诉我调用app.receivedEvent而不是this.receivedEvent,谢谢。 –