mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
syscall/js: adjust comments to that gofmt does not change them
Change-Id: Ic410375987c0f376d0a975e5a6284de10f08b741 Reviewed-on: https://go-review.googlesource.com/c/go/+/642495 Auto-Submit: Ian Lance Taylor <iant@golang.org> Reviewed-by: Alan Donovan <adonovan@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
17ed215958
commit
de9fdc7b71
1 changed files with 24 additions and 24 deletions
|
|
@ -212,7 +212,7 @@ func ValueOf(x any) Value {
|
||||||
|
|
||||||
// stringVal copies string x to Javascript and returns a ref.
|
// stringVal copies string x to Javascript and returns a ref.
|
||||||
//
|
//
|
||||||
// (noescape): This is safe because no references are maintained to the
|
// Using go:noescape is safe because no references are maintained to the
|
||||||
// Go string x after the syscall returns.
|
// Go string x after the syscall returns.
|
||||||
//
|
//
|
||||||
//go:wasmimport gojs syscall/js.stringVal
|
//go:wasmimport gojs syscall/js.stringVal
|
||||||
|
|
@ -302,7 +302,7 @@ func (v Value) Get(p string) Value {
|
||||||
|
|
||||||
// valueGet returns a ref to JavaScript property p of ref v.
|
// valueGet returns a ref to JavaScript property p of ref v.
|
||||||
//
|
//
|
||||||
// (noescape): This is safe because no references are maintained to the
|
// Using go:noescape is safe because no references are maintained to the
|
||||||
// Go string p after the syscall returns.
|
// Go string p after the syscall returns.
|
||||||
//
|
//
|
||||||
//go:wasmimport gojs syscall/js.valueGet
|
//go:wasmimport gojs syscall/js.valueGet
|
||||||
|
|
@ -323,7 +323,7 @@ func (v Value) Set(p string, x any) {
|
||||||
|
|
||||||
// valueSet sets property p of ref v to ref x.
|
// valueSet sets property p of ref v to ref x.
|
||||||
//
|
//
|
||||||
// (noescape): This is safe because no references are maintained to the
|
// Using go:noescape is safe because no references are maintained to the
|
||||||
// Go string p after the syscall returns.
|
// Go string p after the syscall returns.
|
||||||
//
|
//
|
||||||
//go:wasmimport gojs syscall/js.valueSet
|
//go:wasmimport gojs syscall/js.valueSet
|
||||||
|
|
@ -342,7 +342,7 @@ func (v Value) Delete(p string) {
|
||||||
|
|
||||||
// valueDelete deletes the JavaScript property p of ref v.
|
// valueDelete deletes the JavaScript property p of ref v.
|
||||||
//
|
//
|
||||||
// (noescape): This is safe because no references are maintained to the
|
// Using go:noescape is safe because no references are maintained to the
|
||||||
// Go string p after the syscall returns.
|
// Go string p after the syscall returns.
|
||||||
//
|
//
|
||||||
//go:wasmimport gojs syscall/js.valueDelete
|
//go:wasmimport gojs syscall/js.valueDelete
|
||||||
|
|
@ -447,7 +447,7 @@ func (v Value) Call(m string, args ...any) Value {
|
||||||
|
|
||||||
// valueCall does a JavaScript call to the method name m of ref v with the given arguments.
|
// valueCall does a JavaScript call to the method name m of ref v with the given arguments.
|
||||||
//
|
//
|
||||||
// (noescape): This is safe because no references are maintained to the
|
// Using go:noescape is safe because no references are maintained to the
|
||||||
// Go string m after the syscall returns. Additionally, the args slice
|
// Go string m after the syscall returns. Additionally, the args slice
|
||||||
// is only used temporarily to collect the JavaScript objects for
|
// is only used temporarily to collect the JavaScript objects for
|
||||||
// the JavaScript method invocation.
|
// the JavaScript method invocation.
|
||||||
|
|
@ -477,7 +477,7 @@ func (v Value) Invoke(args ...any) Value {
|
||||||
|
|
||||||
// valueInvoke does a JavaScript call to value v with the given arguments.
|
// valueInvoke does a JavaScript call to value v with the given arguments.
|
||||||
//
|
//
|
||||||
// (noescape): This is safe because the args slice is only used temporarily
|
// Using go:noescape is safe because the args slice is only used temporarily
|
||||||
// to collect the JavaScript objects for the JavaScript method
|
// to collect the JavaScript objects for the JavaScript method
|
||||||
// invocation.
|
// invocation.
|
||||||
//
|
//
|
||||||
|
|
@ -505,7 +505,7 @@ func (v Value) New(args ...any) Value {
|
||||||
|
|
||||||
// valueNew uses JavaScript's "new" operator with value v as a constructor and the given arguments.
|
// valueNew uses JavaScript's "new" operator with value v as a constructor and the given arguments.
|
||||||
//
|
//
|
||||||
// (noescape): This is safe because the args slice is only used temporarily
|
// Using go:noescape is safe because the args slice is only used temporarily
|
||||||
// to collect the JavaScript objects for the constructor execution.
|
// to collect the JavaScript objects for the constructor execution.
|
||||||
//
|
//
|
||||||
//go:wasmimport gojs syscall/js.valueNew
|
//go:wasmimport gojs syscall/js.valueNew
|
||||||
|
|
@ -614,7 +614,7 @@ func valuePrepareString(v ref) (ref, int)
|
||||||
|
|
||||||
// valueLoadString loads string data located at ref v into byte slice b.
|
// valueLoadString loads string data located at ref v into byte slice b.
|
||||||
//
|
//
|
||||||
// (noescape): This is safe because the byte slice is only used as a destination
|
// Using go:noescape is safe because the byte slice is only used as a destination
|
||||||
// for storing the string data and references to it are not maintained.
|
// for storing the string data and references to it are not maintained.
|
||||||
//
|
//
|
||||||
//go:wasmimport gojs syscall/js.valueLoadString
|
//go:wasmimport gojs syscall/js.valueLoadString
|
||||||
|
|
@ -658,7 +658,7 @@ func CopyBytesToGo(dst []byte, src Value) int {
|
||||||
|
|
||||||
// copyBytesToGo copies bytes from src to dst.
|
// copyBytesToGo copies bytes from src to dst.
|
||||||
//
|
//
|
||||||
// (noescape): This is safe because the dst byte slice is only used as a dst
|
// Using go:noescape is safe because the dst byte slice is only used as a dst
|
||||||
// copy buffer and no references to it are maintained.
|
// copy buffer and no references to it are maintained.
|
||||||
//
|
//
|
||||||
//go:wasmimport gojs syscall/js.copyBytesToGo
|
//go:wasmimport gojs syscall/js.copyBytesToGo
|
||||||
|
|
@ -677,9 +677,9 @@ func CopyBytesToJS(dst Value, src []byte) int {
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
// copyBytesToJs copies bytes from src to dst.
|
// copyBytesToJS copies bytes from src to dst.
|
||||||
//
|
//
|
||||||
// (noescape): This is safe because the src byte slice is only used as a src
|
// Using go:noescape is safe because the src byte slice is only used as a src
|
||||||
// copy buffer and no references to it are maintained.
|
// copy buffer and no references to it are maintained.
|
||||||
//
|
//
|
||||||
//go:wasmimport gojs syscall/js.copyBytesToJS
|
//go:wasmimport gojs syscall/js.copyBytesToJS
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue