Re:Show HN: Starboard – Fully in-browser literate notebooks ...
by Gehinnn on Tuesday August 04, 2020 @03:52AM
(#24047693)
If you are looking for a rxjs playground + visualizer, you might like this tool:
https://blog.hediet.de/post/a_typescript_playground_for_rx_j...
Re:Show HN: Starboard – Fully in-browser literate notebooks ...
by tanepiper on Tuesday August 04, 2020 @05:20AM
(#24048172)
That's pretty cool, although I liked Starboard's block UI and ability to add other content (actually it works very like EditorJS, which I built an Angular component around: https://medium.com/@tanepiper/ngx-editorjs-angular-module-to...)
Re:Show HN: Starboard – Fully in-browser literate notebooks ...
by thekaleb on Tuesday August 04, 2020 @07:33AM
(#24048873)
Have you tried the import expression as opposed to the import statement?
E.G. const foo = await import('foo.js');
Re:Show HN: Starboard – Fully in-browser literate notebooks ...
by tanepiper on Tuesday August 04, 2020 @07:56AM
(#24049038)
Same - I wonder if it's because it's some sandbox context and it's trying to bind to window (it's the UMD version)
Re:Show HN: Starboard – Fully in-browser literate notebooks ...
by protoduction on Tuesday August 04, 2020 @09:26AM
(#24049702)
I've had a look and wasn't able to get it to work yet, imports can be bit iffy: usually anything that exposes ES modules or puts variables on the window object work fine.
It looks like the reason it doesn't work here is because it relies on "this" being the window object. To make top-level await possible your code gets wrapped into a function, and in there "this" no longer points to the window. I am sure a workaround is possible, I'll make a ticket on github.
One thing is I can't really find docs - I want to add RxJS on the page - is this possible?
Edit: Oh nevermind, I see it in the screenshot on the Github page with the import
Edit 2: Oh actually it's not working:
If I try import { interval } from '...' I get: