oskarkrawczyk/heyoffline

onOnline and onOffline are reversed?

cutin opened this issue · 0 comments

Please see the code below, the output of console.log shows that onOnline and onOffline events are the opposite of network availability. (meaning that onOnline triggered when disconnected from the wifi, and onOffline triggered when reconnected to wifi)
The modal window show and hide are correct.

$(function () {
new Heyoffline({
onOnline: function () {
console.log("online now");
},
onOffline: function () {
console.log("offline now");
}
});
});

please advise,
Thank you,