Firebase service worker dom connection
up vote
0
down vote
favorite
recently I was trying to switch delivering service to firebase.
When I'm focused on tab where I'm trying to receive message everything works fine. Problem starts when I'm on other window, when document is blurred. Firebase api catches notification by service worker.
I need to update counter on web app, when I'm focused on document and when I'm not, so the main issue is the service worker - dom connection. I've found Client.postMessage() api, but it's not supported on safari. Does anyone have idea how to cennect service worker with dom on any platform or catch firebase notification in dom while having app in backgroun?
firebase safari firebase-cloud-messaging service-worker
add a comment |
up vote
0
down vote
favorite
recently I was trying to switch delivering service to firebase.
When I'm focused on tab where I'm trying to receive message everything works fine. Problem starts when I'm on other window, when document is blurred. Firebase api catches notification by service worker.
I need to update counter on web app, when I'm focused on document and when I'm not, so the main issue is the service worker - dom connection. I've found Client.postMessage() api, but it's not supported on safari. Does anyone have idea how to cennect service worker with dom on any platform or catch firebase notification in dom while having app in backgroun?
firebase safari firebase-cloud-messaging service-worker
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
recently I was trying to switch delivering service to firebase.
When I'm focused on tab where I'm trying to receive message everything works fine. Problem starts when I'm on other window, when document is blurred. Firebase api catches notification by service worker.
I need to update counter on web app, when I'm focused on document and when I'm not, so the main issue is the service worker - dom connection. I've found Client.postMessage() api, but it's not supported on safari. Does anyone have idea how to cennect service worker with dom on any platform or catch firebase notification in dom while having app in backgroun?
firebase safari firebase-cloud-messaging service-worker
recently I was trying to switch delivering service to firebase.
When I'm focused on tab where I'm trying to receive message everything works fine. Problem starts when I'm on other window, when document is blurred. Firebase api catches notification by service worker.
I need to update counter on web app, when I'm focused on document and when I'm not, so the main issue is the service worker - dom connection. I've found Client.postMessage() api, but it's not supported on safari. Does anyone have idea how to cennect service worker with dom on any platform or catch firebase notification in dom while having app in backgroun?
firebase safari firebase-cloud-messaging service-worker
firebase safari firebase-cloud-messaging service-worker
edited Nov 9 at 14:01
Frank van Puffelen
218k25361385
218k25361385
asked Nov 9 at 13:49
Jakub Szczepanik
82
82
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53226973%2ffirebase-service-worker-dom-connection%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password