Do web workers work in Figjam Widgets?

I’m trying to use a React package to build an editor for code art in Figjam.

I was trying to use the sandpack NPM package to help with this.

Unfortunately, I get a flurry of error console messages (see image: Image 2022-02-08 at 11.21.4... ) after adding the 2 lines quickstart from the create-figma-plugin kit.

While I think the fix may ultimately involve a patch upstream to the Sandpack developers, I wanted to first write to ask about known limitations to the widget iframe API. IIRC I believe access to the microphone and camera are blocked, but I couldn’t find these API limits documented on the public docs (I checked several pages, including the Figjam widget docs ).

I suspect that the Figjam iframe may also not support communicating with web-workers](leading to the error messages reported above), but I wanted to ask if this is expected before spending any more time going through 3rd party library internals.

1 Like