فهرست منبع

Make sure that platform specific properties are added before custom deviceready events were called

Sebastián Katzer 11 سال پیش
والد
کامیت
5a098fb419
1فایلهای تغییر یافته به همراه4 افزوده شده و 3 حذف شده
  1. 4 3
      www/local-notification.js

+ 4 - 3
www/local-notification.js

@@ -205,10 +205,11 @@ LocalNotification.prototype = {
     oncancel: function (id, state, json) {}
 };
 
-var plugin = new LocalNotification();
+var plugin  = new LocalNotification(),
+    channel = require('cordova/channel');
 
-document.addEventListener('deviceready', function () {
+channel.onCordovaReady.subscribe( function () {
     plugin.applyPlatformSpecificOptions();
-}, false);
+});
 
 module.exports = plugin;