anvilistas / anvil-labs

MIT License
9 stars 3 forks source link

webworker: new approach - the web-worker requests imports #92

Closed s-cork closed 1 year ago

s-cork commented 1 year ago

@rhurlbatt - this should mean you can remove the script tag

In this PR the web worker doesn't know anything about the available modules When an import happens the web worker asks the client worker for the source code it needs The client worker returns the requested source code to the web worker using Skulpt APIs

This should mean that we don't run into syntax errors like #90 We don't send every single python module to the web worker instead we just politely get the module when requested.