Can you explain the distinction between document.body.ononline
and navigator.onLine
? Do they utilize the same JavaScript
API for checking network connectivity status (online/offline)? I have searched on Google
but couldn't find a definitive answer. If these two methods have their own API for validating network connection, then which one is considered to be more dependable: document.body.ononline
or navigator.onLine
?