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