mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-21 11:15:36 -05:00
PyScript Core Documentation (#1560)
This commit is contained in:
committed by
GitHub
parent
bf6470c046
commit
9121071ba3
@@ -114,10 +114,10 @@ document.head.appendChild(document.createElement("style")).textContent = `
|
||||
onAfterRunAsync(pyodide, element) {
|
||||
bootstrapNodeAndPlugins(pyodide, element, after, "onAfterRunAsync");
|
||||
},
|
||||
async onRuntimeReady(pyodide, element) {
|
||||
async onInterpreterReady(pyodide, element) {
|
||||
// allows plugins to do whatever they want with the element
|
||||
// before regular stuff happens in here
|
||||
for (const callback of hooks.onRuntimeReady)
|
||||
for (const callback of hooks.onInterpreterReady)
|
||||
callback(pyodide, element);
|
||||
if (isScript(element)) {
|
||||
const {
|
||||
@@ -178,7 +178,7 @@ export const hooks = {
|
||||
/** @type {Set<function>} */
|
||||
onAfterRunAsync: new Set(),
|
||||
/** @type {Set<function>} */
|
||||
onRuntimeReady: new Set(),
|
||||
onInterpreterReady: new Set(),
|
||||
|
||||
/** @type {Set<string>} */
|
||||
codeBeforeRunWorker: new Set(),
|
||||
|
||||
Reference in New Issue
Block a user