I'm Drew Town a web developer and systems engineer in Colorado. Always learning, traveling and exploring. Sharing updates, trials and tribulations in tech and life.
I was curious as to how v-offline was working under the hood and it looks like it is using the Window.Navigator object which I had never heard of before. Then it seems to listen to a few events and update the isOnline status based on those events the browser fires.
That was a fun little rabbit hole. Thanks for sharing!
I believe that it implements some event listeners along with the observes of vue to do this behind the scenes, thank you for reading, it made my life a lot easier, the navigator is a hand on the wheel for several methods at a glance here If you want know more about 😀
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I was curious as to how
v-offline
was working under the hood and it looks like it is using the Window.Navigator object which I had never heard of before. Then it seems to listen to a few events and update theisOnline
status based on those events the browser fires.That was a fun little rabbit hole. Thanks for sharing!
I believe that it implements some event listeners along with the observes of vue to do this behind the scenes, thank you for reading, it made my life a lot easier, the navigator is a hand on the wheel for several methods at a glance here If you want know more about 😀