-
Notifications
You must be signed in to change notification settings - Fork 945
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Option to let @jupyter/html-manager import js files from cdn directly #2786
Comments
Can you write your own loader, based on that requireLoader, and instantiate the HTML manager with that loader that does what you want? That ipywidgets/packages/html-manager/src/libembed-amd.ts Lines 94 to 97 in 4b485b1
|
@jasongrout Thanks for the suggestion.
to load html-manager. Can you point me to where I can add the requireLoader customization? |
I guess I found something close, am I expected to use the libembed-amd.js and call it as a library?
But I didn't find any usage example, is there any documentation out there? |
I didn't realize you were loading the pre-built manager (with the default loader) from a CDN, rather than using the html manager as a library in your own code. For that usecase, I think you're right that a configuration option would be the most convenient, and certainly similar to the cdn configuration option. Do you want to submit a PR? |
Thanks, I'll see if I have time soon. Doesn't seem like a complex change to me. |
I think you are right that it should be pretty straightforward, especially if you follow the pattern in that file already for the other data attribute. |
FYI, sent #2792 to resolve this. |
Current behavior is:
ipywidgets/packages/html-manager/src/libembed-amd.ts
Line 65 in 4b485b1
Context
However, as I investigated in issue: kubeflow/pipelines#3114
My application is deployed in a secured cluster, it is exposed to user through a proxy that checks some cookies for authentication. However, the embedded jupyter widget visualization is run in a sandboxed iframe, so it will never be able to talk to same site urls. This caused the infinite redirection error. (the widget still loads successfully falling back to cdn, but it takes about 2 seconds to wait for the meaningless redirections.)
Feature Request
Therefore, I'm proposing this feature request. I think if we can configure behavior to load from cdn directly that will solve the problem for us.
Add an option similar to
data-jupyter-widgets-cdn
to skip the first try and load from cdn directly.The text was updated successfully, but these errors were encountered: