]> Cypherpunks.ru repositories - gostls13.git/blobdiff - misc/wasm/wasm_exec.js
misc/wasm: update deprecated substr usage
[gostls13.git] / misc / wasm / wasm_exec.js
index 9ce6a20c3ffa82debd6853a72f02c316ccfb642d..e6c8921091ec1253e5de679bb5ba75187936e0ee 100644 (file)
@@ -19,8 +19,8 @@
                                outputBuf += decoder.decode(buf);
                                const nl = outputBuf.lastIndexOf("\n");
                                if (nl != -1) {
-                                       console.log(outputBuf.substr(0, nl));
-                                       outputBuf = outputBuf.substr(nl + 1);
+                                       console.log(outputBuf.substring(0, nl));
+                                       outputBuf = outputBuf.substring(nl + 1);
                                }
                                return buf.length;
                        },