in-the-node
Embed node inside your browser with RunKit
in-the-node
Running server-side code in your browser.
Embed node inside your browser with RunKit.
Provide the initial notebook script via a child script tag:
<!-- Polyfill for re(dge)tro browsers -->
<script src="https://unpkg.com/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
<!-- Polyfill for re(dge)tro browsers -->
<script type="module" src="../in-the-node.js"></script>
<in-the-node>
<script nomodule>
// GeoJSON!
var getJSON = require("async-get-json");
await getJSON("https://storage.googleapis.com/maps-devrel/google.json");
</script>
</in-the-node>
Syntax color JS object / JSON
Run-kit also comes with a nice prebuilt JSON syntax colorizer / tree view.
To support this basic functionality, pass the object you want to format to the input property:
document.querySelector('in-the-node').input = {myStringProp: 'hello', mySubObjProp:{greeting: 'hello'}}
Install the Polymer-CLI
First, make sure you have the Polymer CLI and npm (packaged with Node.js) installed. Run npm install
to install your element's dependencies, then run polymer serve
to serve your element locally.
Viewing Your Element
$ polymer serve
Links
Compatibility
Was this helpful? Need more help?
Leave a comment or a question below. You can also join
the chat on Discord or
ask questions on StackOverflow.
Version
Dependencies
- xtal-latx#0.0.86
- Released
- 2018-12-26
- Maturity
- IMPORTED
- License
- MIT License
Compatibility
- Framework
- Browser
- Browser Independent
in-the-node - Vaadin Add-on Directory
Embed node inside your browser with RunKit[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/in-the-node)
# in-the-node
## Running server-side code in your browser.
Embed node inside your browser with [RunKit](https://runkit.com/docs/embed).
[Full-screen Demo](https://rawgit.com/bahrus/in-the-node/master/demo/index.html)
Provide the initial notebook script via a child script tag:
```html
```
## Syntax color JS object / JSON
Run-kit also comes with a nice prebuilt JSON syntax colorizer / tree view.
To support this basic functionality, pass the object you want to format to the input property:
```JavaScript
document.querySelector('in-the-node').input = {myStringProp: 'hello', mySubObjProp:{greeting: 'hello'}}
```
## Install the Polymer-CLI
First, make sure you have the [Polymer CLI](https://www.npmjs.com/package/polymer-cli) and npm (packaged with [Node.js](https://nodejs.org)) installed. Run `npm install` to install your element's dependencies, then run `polymer serve` to serve your element locally.
## Viewing Your Element
```
$ polymer serve
```