jupyterlite / xeus

JupyterLite loader for Xeus kernels
https://jupyterlite-xeus.readthedocs.io
BSD 3-Clause "New" or "Revised" License
22 stars 12 forks source link

xhr is called synchronously #106

Open trungleduc opened 2 months ago

trungleduc commented 2 months ago

Description

getJson helper is using XMLHttpRequest synchronously, which is deprecated and does not work well with service worker. Is there any technical season to avoid async call here or can we convert this function to use fetch?

https://github.com/jupyterlite/xeus/blob/6504866ceb6b89000f3786f59dcb2e343bfb88c0/src/index.ts#L15-L20

trungleduc commented 2 months ago

cc @DerThorsten

DerThorsten commented 2 months ago

@trungleduc so if you can make this part async then we of course can just use fetch I assume that part here

export default plugins;

is the problem

trungleduc commented 2 months ago

Thanks @DerThorsten, i will open a PR to fix this issue.