mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-26 12:03:28 +08:00
Set type of channel.
This commit is contained in:
parent
4fd8a4dad8
commit
c6280edbed
@ -153,25 +153,25 @@ PhoneGap.addPlugin = function(name, obj) {
|
|||||||
* onDOMContentLoaded channel is fired when the DOM content
|
* onDOMContentLoaded channel is fired when the DOM content
|
||||||
* of the page has been parsed.
|
* of the page has been parsed.
|
||||||
*/
|
*/
|
||||||
PhoneGap.onDOMContentLoaded = new PhoneGap.Channel();
|
PhoneGap.onDOMContentLoaded = new PhoneGap.Channel('onDOMContentLoaded');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* onNativeReady channel is fired when the PhoneGap native code
|
* onNativeReady channel is fired when the PhoneGap native code
|
||||||
* has been initialized.
|
* has been initialized.
|
||||||
*/
|
*/
|
||||||
PhoneGap.onNativeReady = new PhoneGap.Channel();
|
PhoneGap.onNativeReady = new PhoneGap.Channel('onNativeReady');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* onResume channel is fired when the PhoneGap native code
|
* onResume channel is fired when the PhoneGap native code
|
||||||
* resumes.
|
* resumes.
|
||||||
*/
|
*/
|
||||||
PhoneGap.onResume = new PhoneGap.Channel();
|
PhoneGap.onResume = new PhoneGap.Channel('onResume');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* onPause channel is fired when the PhoneGap native code
|
* onPause channel is fired when the PhoneGap native code
|
||||||
* pauses.
|
* pauses.
|
||||||
*/
|
*/
|
||||||
PhoneGap.onPause = new PhoneGap.Channel();
|
PhoneGap.onPause = new PhoneGap.Channel('onPause');
|
||||||
|
|
||||||
// _nativeReady is global variable that the native side can set
|
// _nativeReady is global variable that the native side can set
|
||||||
// to signify that the native code is ready. It is a global since
|
// to signify that the native code is ready. It is a global since
|
||||||
@ -182,7 +182,7 @@ if (typeof _nativeReady !== 'undefined') { PhoneGap.onNativeReady.fire(); }
|
|||||||
* onDeviceReady is fired only after both onDOMContentLoaded and
|
* onDeviceReady is fired only after both onDOMContentLoaded and
|
||||||
* onNativeReady have fired.
|
* onNativeReady have fired.
|
||||||
*/
|
*/
|
||||||
PhoneGap.onDeviceReady = new PhoneGap.Channel();
|
PhoneGap.onDeviceReady = new PhoneGap.Channel('onDeviceReady');
|
||||||
|
|
||||||
PhoneGap.onDeviceReady.subscribeOnce(function() {
|
PhoneGap.onDeviceReady.subscribeOnce(function() {
|
||||||
PhoneGap.JSCallback();
|
PhoneGap.JSCallback();
|
||||||
|
Loading…
Reference in New Issue
Block a user