jupyterlite-sphinx icon indicating copy to clipboard operation
jupyterlite-sphinx copied to clipboard

Think of dialog to confirm whether to load JupyterLight

Open Carreau opened this issue 4 months ago • 4 comments

~~This is not perfect, in particular the confirm(...) is a blocking call, which is not supposed to be used in a OnClik handler as an onclick handler need to respond fast.~~

~~I think this need to be refactored into utilities functions, and setTimeout(0, callback), and/or Promises.~~

~~That way the onClick finishes immediately and does not violate the timeout limit.~~

We can't use SetTimeout either as it also suffer the same problem. For now I think we can live with the warning in the console on slow or metered connections.

As noted in the comment, the navigator api is experimental, so it would be good to test properly. In Web Inspector (Firefox and Chome at least), it is possible to artificially throttle the connection to test the logic.

Carreau avatar Mar 05 '24 10:03 Carreau