push code to window on aftereval
This commit is contained in:
parent
b5fbcd108f
commit
42000a7628
3 changed files with 4 additions and 6 deletions
|
|
@ -90,6 +90,9 @@ export function Repl({ embedded = false }) {
|
|||
beforeEval: () => audioReady,
|
||||
afterEval: (all) => {
|
||||
const { code } = all;
|
||||
//post to iframe parent (like Udels) if it exists...
|
||||
window.parent?.postMessage(code);
|
||||
|
||||
setLatestCode(code);
|
||||
window.location.hash = '#' + code2hash(code);
|
||||
setDocumentTitle(code);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue