Skip to content

Instantly share code, notes, and snippets.

@devdutta
Last active June 25, 2019 13:09
Show Gist options
  • Save devdutta/e4d7c19a0bbf403cff1e154443d391d6 to your computer and use it in GitHub Desktop.
Save devdutta/e4d7c19a0bbf403cff1e154443d391d6 to your computer and use it in GitHub Desktop.

Revisions

  1. devdutta revised this gist Jun 25, 2019. No changes.
  2. devdutta renamed this gist Jun 25, 2019. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. devdutta revised this gist Jun 25, 2019. 1 changed file with 1 addition and 5 deletions.
    6 changes: 1 addition & 5 deletions index.html
    Original file line number Diff line number Diff line change
    @@ -10,9 +10,5 @@

    // Load the notebook, observing its cells with a default Inspector
    // that simply renders the value of each cell into the provided DOM node.
    new Runtime().module(notebook, name => {
    if (name === "chart") {
    return new Inspector(document.querySelector("#chart"));
    }
    });
    new Runtime().module(notebook, Inspector.into(document.body));
    </script>
  4. devdutta revised this gist Jun 25, 2019. No changes.
  5. devdutta revised this gist Jun 25, 2019. 1 changed file with 5 additions and 2 deletions.
    7 changes: 5 additions & 2 deletions index.html
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,9 @@

    // Load the notebook, observing its cells with a default Inspector
    // that simply renders the value of each cell into the provided DOM node.
    new Runtime().module(notebook, Inspector.into(document.body));

    new Runtime().module(notebook, name => {
    if (name === "chart") {
    return new Inspector(document.querySelector("#chart"));
    }
    });
    </script>
  6. devdutta created this gist Jun 25, 2019.
    15 changes: 15 additions & 0 deletions index.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    <!DOCTYPE html>
    <body>
    <script type="module">

    // Load the Observable runtime and inspector.
    import {Runtime, Inspector} from "https://cdn.jsdelivr.net/npm/@observablehq/runtime@4/dist/runtime.js";

    // Your notebook, compiled as an ES module.
    import notebook from "https://api.observablehq.com/@devdutta/gdp-per-capita-ppp-inflation-ajusted-1990-2017.js?v=3";

    // Load the notebook, observing its cells with a default Inspector
    // that simply renders the value of each cell into the provided DOM node.
    new Runtime().module(notebook, Inspector.into(document.body));

    </script>