Help

Welcome to the Airtable Community! If you're new here, check out our Getting Started area to get the most out of your community experience.

Register a service worker within a custom block

Topic Labels: Custom extensions
576 2
cancel
Showing results for 
Search instead for 
Did you mean: 

Hi,

I’d like to be able to register a remotely hosted service worker within a custom block in order to activate push notifications. I tried it but I faced cross-origin errors because the iframe is on a different origin from the remote service worker. Any ideas how I could achieve this?

Thanks in advance,
Fatma.

2 Replies 2

The going advice is to use importScripts to load cross-origin scripts from the Service Worker:

Unfortunately, this isn’t a complete answer. You’ll still need a way to host a standalone script (that is: the “bootstap” Service Worker script that you register via navigator.serviceWorker.register) in a Block installation, and that’s not currently possible.

The good news is that Custom Blocks is still in beta, so the folks at Airtable are especially receptive to feature requests like this.

Thanks for the response @Mike_Pennisi. Hopefully its something that could be implemented soon :slightly_smiling_face: