Check last state in Chrome Extension

25 views
Skip to first unread message

Bob The Builder

unread,
Sep 8, 2017, 1:56:38 PM9/8/17
to Chromium-dev
I am not sure if there is the right group, if not please let me know where this should go.  

I have a Chrome extension I am working on that queries a remote server and shows a desktop notification when it changes.  I am using an event page which will frequently go to sleep so I use a Google Alarm to have it do a check every 5 minutes. I save the last state out into a variable and compare it to current state to determine if a desktop notification should be displayed.  I'm finding this last state variable is frequently going undefined when chrome is not in the foreground or under other conditions.  I have a few variables this may be happening to as well.

How do I prevent this from happening?

Hector Carmona

unread,
Sep 8, 2017, 2:50:30 PM9/8/17
to vamp...@gmail.com
Extension development questions should be directed at stack overflow. As per the instructions here.

Best regards!

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/0df33aae-67e6-4aea-9bd9-cf642a2d02ed%40chromium.org.
--

Hector Carmona | Software Engineer | hcar...@google.com

Reply all
Reply to author
Forward
0 new messages