8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
substring()
substr()
1 parent a3e86f3 commit 86eb771Copy full SHA for 86eb771
pyscriptjs/src/interpreter.ts
@@ -23,7 +23,7 @@ const loadInterpreter = async function (indexUrl:string): Promise<any> {
23
// let's get the full path of where PyScript is running from so we can load the pyscript.py
24
// file from the same location
25
const loadedScript: HTMLScriptElement = document.querySelector(`script[src$='pyscript.js']`);
26
- const scriptPath = loadedScript.src.substr(0, loadedScript.src.lastIndexOf('/'));
+ const scriptPath = loadedScript.src.substring(0, loadedScript.src.lastIndexOf('/'));
27
await pyodide.runPythonAsync(await (await fetch(`${scriptPath}/pyscript.py`)).text());
28
29
console.log(scriptPath);
0 commit comments