Change Plugin Hooks to Use options object/kwargs (#1132)

This commit is contained in:
Jeff Glass
2023-01-26 07:20:04 -06:00
committed by GitHub
parent 697ac9de9a
commit 12bf6db331
4 changed files with 37 additions and 37 deletions

View File

@@ -24,9 +24,9 @@ export function make_PyScript(interpreter: Interpreter, app: PyScriptApp) {
const pySrc = await this.getPySrc();
this.innerHTML = '';
app.plugins.beforePyScriptExec(interpreter, pySrc, this);
app.plugins.beforePyScriptExec({interpreter: interpreter, src: pySrc, pyScriptTag: this});
const result = pyExec(interpreter, pySrc, this);
app.plugins.afterPyScriptExec(interpreter, pySrc, this, result);
app.plugins.afterPyScriptExec({interpreter: interpreter, src: pySrc, pyScriptTag: this, result: result});
}
async getPySrc(): Promise<string> {