API for getting URLs for JavaScript files?
See original GitHub issueThere is ipywidgets.embed.DEFAULT_EMBED_REQUIREJS_URL
, but is there also an API to get the require.js
URL?
I could probably use ipywidgets.embed.load_requirejs_template
, but I don’t know if that’s part of the public API. Is it?
I’m also not quite sure if I’m supposed to use crossorigin="anonymous"
or not. In load_requirejs_template
it is hard-coded for one URL, and optional for the other.
In the end, I want to use those URLs in Sphinx, see https://github.com/spatialaudio/nbsphinx/issues/84.
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (13 by maintainers)
Top Results From Across the Web
URL.createObjectURL() - Web APIs | MDN
The URL.createObjectURL() static method creates a string containing a URL representing the object given in the parameter.
Read more >LinkFinder - Script to search Endpoints in JavaScript Files
In this example, we are searching for .js files from the Desktop directory and looking for the endpoint /api/. Example 6: Ignore certain...
Read more >How to Connect to an API with JavaScript - Tania Rascia
To get started, let's scroll to the films section. On the right you'll see GET /films . It will show us the URL...
Read more >URL | Node.js v19.3.0 Documentation
The node:url module provides two APIs for working with URLs: a legacy API that is Node.js specific, and a newer API that implements...
Read more >GerbenJavado/LinkFinder: A python script that finds ... - GitHub
A python script that finds endpoints in JavaScript files - GitHub - GerbenJavado/LinkFinder: A python script that finds endpoints in JavaScript files.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That’s just how the Sphinx configuration works. The global variables are somehow automatically turned into Sphinx options (if those options exist). See http://www.sphinx-doc.org/en/master/usage/configuration.html.
Well that’s the question!
The problem, as I see it, is that I would always need to
import ipywidgets
, even for projects which don’t use widgets. I don’t want to haveipywidgets
as unconditional dependency.However, now that I think about it, I might be able to check if widget states are used in any notebook and only
import ipywidgets
(and in turn include the.js
URL) in this case …In that case though, I shouldn’t use
html_js_files
, because I cannot detect user overrides (because it might be used for completely different JS files). But I could use a new configuration value, just like I’ve done fornbsphinx_requirejs_path
(see https://github.com/spatialaudio/nbsphinx/pull/327). Something likenbsphinx_widgets_path
?Do you think this would be worthwhile?
It sounds promising … fully automatic widget support, but without overhead if widgets are not used.
I think it would be helpful to mention in the docs that
DEFAULT_EMBED_REQUIREJS_URL
is considered part of the API.And it would be good to know if I’m supposed to use
crossorigin="anonymous"
or not.