简体   繁体   中英

Cordova + ratchet - script inside Push is not working on Android 4.3 and below

I am developing a cordova application for android and windows and I am using Ratchet framework. I have written my pagewise script inside push function like,

window.addEventListener('push', function() {
  //My custom events
});

After building the application with cordova, My custom events are firing in Android 4.4 whereas its not firing in android 4.3 and below. Also when I checked the html pages on browser without building the app, push is working fine in all the versions .

I am stuck here . What could be the problem for this ?

Thanks in advance.

CustomEvent is not defined in Webview on Android <4.4.
Check this pull request on ratchet, it's a patch to redefine CustomEvent if not.
https://github.com/twbs/ratchet/pull/748/files

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM