If you want to send messages between two windows, two tabs, or a page and a service worker, and you want those messages to only be accessible between two end points then ChannelMessaging is what you want.
Code from video: https://gist.github.com/prof3ssorSt3v...