push code to window on aftereval

This commit is contained in:
Jade (Rose) Rowland 2024-07-09 22:48:14 -04:00
parent b5fbcd108f
commit 42000a7628
3 changed files with 4 additions and 6 deletions

View file

@ -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);