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,謝謝。 –