SB1 WebSQL On Badge Page

L Larry Stanton 3 years 7 months ago
1 0 0

I've got an application that handles it's own authentication, but it does this using cached credentials in WebSQL since our users tend to be far away from wireless infrastructure during normal operation. The issue I'm having is with badge mode. The badge page is set, but needs access to WebSQL to get the information for the currently logged in user. As far as I can tell, setting the badge causes the SB1 to get and cache the badge page once, which means it updates itself before the first user login, and then never again always showing a badge that says there is no user logged in. I've attempted calling the asl.badge() method multiple times, but it seems happy to cache the badge page, so reissuing the badge setting does nothing. The other thing I've tried is setting listeners with window.addEventListener('storage', blah_blah, false); and then setting a localStorage item on log in and log out. This does not seem to fire an event on the badge page leading me to believe the badge is not run in another "tab" within the running webkit browser.
 
My question is, how can I either get the badge page to rerun JS on each load, or catch local storage events generated from the running application? Alternatively, Is there another method to accomplish this same effect?

CONTACT
Can’t find what you’re looking for?