javascript - Offline.js Cross-domain Image gives undefined -
i want web app know if it's online (to avoid google maps functions), use offline.js. i'm trying access image our website, web app not hosted online (it's run locally), access cross-domain. here code in $(document).one('ready',
:
offline.options = { checks: { image: { url: 'http://www.portalogic.info/images/portalogic.gif' }, active: 'image' } }; var on_line = offline.check(); console.log(on_line);
but on_line = undefined
. why this? there different way this?