Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Latest commit

 

History

History

message-relay

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Message Relay

This recipe shows how to communicate between the service worker and a page and shows how to use a service worker to relay messages between pages.

Difficulty

Beginner

Use Case

The postMessage API is brilliant for passing messages between windows and iframes, and now we can use the service worker's message event to act as a messenger.

Features and Usage

  • postMessage API
  • Service worker registration

Category

General Usage