Created
June 11, 2019 18:46
-
-
Save Mbrownshoes/1267ca609da3e6e088f4e7a604f9ee0c to your computer and use it in GitHub Desktop.
embed test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<style> | |
</style> | |
<div class="notebook-content"> | |
</div> | |
<script type="module"> | |
import notebook from "https://api.observablehq.com/@bumbeishvili/jsfiddle-embed-notebook.js"; // "download code" url | |
document.querySelector('.notebook-content').innerHTML =notebook.modules[0].variables | |
.filter(d=>d) | |
.map((d,i)=>` <div class=" observable-wrapper div-number-${i}"></div>`) | |
.join(''); | |
import {Inspector, Runtime} from "https://unpkg.com/@observablehq/runtime@3/dist/runtime.js"; | |
let i=1; | |
Runtime.load(notebook, (variable) => { | |
return new Inspector(document.querySelector(`.observable-wrapper:nth-child(${i++})`)); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment