Comments (3)
Ah, fun to see a potential integration into Jupyterlab! :)
I think the short answer is that you should run Starboard Notebook in an iframe inside of JupyterLab (or any web app) on a different origin. Running it without the iframe is a security hazard (if you open my evil notebook it can call JupyterLab's Kernel API and mess with your computer by executing arbitrary Python code.
Of course if this is more of a hobby project and you can trust all notebooks you will ever open then you can get away with a notebook on the same origin. Starboard wrap (https://github.com/gzuidhof/starboard-wrap) makes it easy to do. Without the iframe you will probably also have clashing styles and JS.
Now of course this error you are seeing should be fixed anyhow, I wonder what kind of URL it is trying to construct.. A service worker can only be registered under the path where it is located, so here it won't be succesful anyway :(. For example a service worker on https://bla.com/a/b/myserviceworker.js
will only be able to intercept requests from URLs under /a/b/
, in your setup these paths are different which will be problematic.
I'm not sure if it is possible to make Jupyter Lab cross origin isolated - I think it is, but you will need to tell Jupyter Lab to set the correct headers (reference).
I'm sorry that this is a bit of an involved answer :(, the entire cross origin isolated / secure context requirements that browsers have nowadays are complicated. If you want you can join the small Discord community and we can have a bit of a tighter feedback loop https://discord.gg/EGgm3mPP
from starboard-notebook.
Thank you for the fast reply. Security is not an issue for now. Nevertheless, I'll try the iframe thing. Hopefully my model tree will then still be able to interact with the code cells of starboard, to remotely control the notebooks during batch studies or sensitivity analysis.
(My aim is to combine several observable notebooks in a model tree. I am not sure, where this journey is going to, more to Jupyter and akernel or to Starboard and observablehq. Currently I play around a bit to understand available options and their limitations...)
I wonder what kind of URL it is trying to construct
The corresponding code section is shown on first screenshot, line 18 in the dev tools.
from starboard-notebook.
Using starboard-wrap and importing starboard from cdn source
https://cdn.starboard.gg/npm/[email protected]/dist/index.html
worked without cross origin warnings. I also tried to use starboard-wrap in combination with the local instance of starboard-notebook under node_modules. However, I did not get it working. There is an existing issue ticket on that topic:
from starboard-notebook.
Related Issues (20)
- Markdown hard break breaking the editor
- npm install fails with 0.15.3 HOT 1
- `px.bar` fails in Python HOT 2
- import plotly.js? HOT 1
- "503 first byte timeout" on `pd.read_csv(pyodide.open_url(url))` HOT 3
- captcha broken on account recovery page HOT 3
- Using Pyodide > 0.20 HOT 1
- Token `thread_open` not supported by Markdown parser. HOT 2
- litHtml HOT 2
- Authentication problem on https://starboard.gg HOT 2
- Js exception with pandas - df[‘a’] / df.a HOT 3
- Issue in notebook https://starboard.gg/#python HOT 1
- Markdown editor not working - possible package version mismatches
- Development documentation is not updated HOT 1
- starboard as a publishing platform? HOT 2
- Interactive plots: Access to current cell output (CURRENT_HTML_OUTPUT_ELEMENT) from python possible?
- Request: "Run all"
- Glitch on initial load of HTML cells
- Is there a demo of vue?
- New release with Pyodide 0.25? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from starboard-notebook.