5 ms·
Hi, I have had a look and I think it look great - it really fits the format of a set of notes I'd like to share. One thing is I can't really find docs - I want
by tanepiper 6y ago
Hi, I have had a look and I think it look great - it really fits the format of a set of notes I'd like to share.
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:
TypeError: Cannot set property 'rxjs' of undefined
If I try import { interval } from '...' I get:
SyntaxError: 'import' and 'export' may only appear at the top level (1:14)
- Gehinnn 6y agoIf you are looking for a rxjs playground + visualizer, you might like this tool: https://blog.hediet.de/post/a_typescript_playground_for_rx_js https://blog.hediet.de/post/a_typescript_playground_for_rx_j...
- tanepiper 6y agoThat'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-use-editorjs-in-your-application-8c1873c09b6c https://medium.com/@tanepiper/ngx-editorjs-angular-module-to...)
- thekaleb 6y agoHave you tried the import expression as opposed to the import statement? E.G. const foo = await import('foo.js');
- tanepiper 6y agoSame - I wonder if it's because it's some sandbox context and it's trying to bind to window (it's the UMD version)
- protoduction 6y agoI'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. https://github.com/gzuidhof/starboard-notebook/issues/1 https://github.com/gzuidhof/starboard-notebook/issues/1