Skip to content

Instantly share code, notes, and snippets.

@bryangingechen
Created September 26, 2019 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bryangingechen/03cdddd2b669b90dfdf09268338444bb to your computer and use it in GitHub Desktop.
Save bryangingechen/03cdddd2b669b90dfdf09268338444bb to your computer and use it in GitHub Desktop.
override test
<!DOCTYPE html>
<meta charset="utf-8">
<title>override embed test</title>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@observablehq/inspector@3/dist/inspector.css">
<body>
<script type="module">
import {Runtime, Inspector} from "https://cdn.jsdelivr.net/npm/@observablehq/runtime@4/dist/runtime.js";
import define from "https://api.observablehq.com/d/90c7d6a9d26692a1.js?v=3";
const runtime = new Runtime();
const main = runtime.module(define, Inspector.into(document.body));
main.redefine("a", () => {
console.log("ran new a");
return 4;
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment