diff options
author | Marko Kungla <marko.kungla@gmail.com> | 2022-05-13 01:34:02 +0300 |
---|---|---|
committer | Gopher Robot <gobot@golang.org> | 2022-09-27 17:15:12 +0000 |
commit | ff34676cdd5f2c318fa58e78c84a90b3e5a21b04 (patch) | |
tree | 5b36ea74e69da21ff067a54d3836691e5228fb84 /misc/wasm | |
parent | 6c3567873c4c58fe5b9e9abe77fed826a8e2ac97 (diff) | |
download | go-ff34676cdd5f2c318fa58e78c84a90b3e5a21b04.tar.gz go-ff34676cdd5f2c318fa58e78c84a90b3e5a21b04.zip |
misc/wasm: update deprecated substr usage
String.prototype.substr is deprecated and usage is no longer
recommended so using String.prototype.substring instead.
Change-Id: I9eb49a8c065890df73301e3a04af59f550bc3ae1
Reviewed-on: https://go-review.googlesource.com/c/go/+/406094
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Diffstat (limited to 'misc/wasm')
-rw-r--r-- | misc/wasm/wasm_exec.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/misc/wasm/wasm_exec.js b/misc/wasm/wasm_exec.js index 9ce6a20c3f..e6c8921091 100644 --- a/misc/wasm/wasm_exec.js +++ b/misc/wasm/wasm_exec.js @@ -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; }, |