@@ -212,8 +212,8 @@ func ValueOf(x any) Value {
212
212
213
213
// stringVal copies string x to Javascript and returns a ref.
214
214
//
215
- // (noescape): This is safe because no references are maintained to the
216
- // Go string x after the syscall returns.
215
+ // Using go:noescape is safe because no references are maintained to the
216
+ // Go string x after the syscall returns.
217
217
//
218
218
//go:wasmimport gojs syscall/js.stringVal
219
219
//go:noescape
@@ -302,8 +302,8 @@ func (v Value) Get(p string) Value {
302
302
303
303
// valueGet returns a ref to JavaScript property p of ref v.
304
304
//
305
- // (noescape): This is safe because no references are maintained to the
306
- // Go string p after the syscall returns.
305
+ // Using go:noescape is safe because no references are maintained to the
306
+ // Go string p after the syscall returns.
307
307
//
308
308
//go:wasmimport gojs syscall/js.valueGet
309
309
//go:noescape
@@ -323,8 +323,8 @@ func (v Value) Set(p string, x any) {
323
323
324
324
// valueSet sets property p of ref v to ref x.
325
325
//
326
- // (noescape): This is safe because no references are maintained to the
327
- // Go string p after the syscall returns.
326
+ // Using go:noescape is safe because no references are maintained to the
327
+ // Go string p after the syscall returns.
328
328
//
329
329
//go:wasmimport gojs syscall/js.valueSet
330
330
//go:noescape
@@ -342,8 +342,8 @@ func (v Value) Delete(p string) {
342
342
343
343
// valueDelete deletes the JavaScript property p of ref v.
344
344
//
345
- // (noescape): This is safe because no references are maintained to the
346
- // Go string p after the syscall returns.
345
+ // Using go:noescape is safe because no references are maintained to the
346
+ // Go string p after the syscall returns.
347
347
//
348
348
//go:wasmimport gojs syscall/js.valueDelete
349
349
//go:noescape
@@ -447,10 +447,10 @@ func (v Value) Call(m string, args ...any) Value {
447
447
448
448
// valueCall does a JavaScript call to the method name m of ref v with the given arguments.
449
449
//
450
- // (noescape): This is safe because no references are maintained to the
451
- // Go string m after the syscall returns. Additionally, the args slice
452
- // is only used temporarily to collect the JavaScript objects for
453
- // the JavaScript method invocation.
450
+ // Using go:noescape is safe because no references are maintained to the
451
+ // Go string m after the syscall returns. Additionally, the args slice
452
+ // is only used temporarily to collect the JavaScript objects for
453
+ // the JavaScript method invocation.
454
454
//
455
455
//go:wasmimport gojs syscall/js.valueCall
456
456
//go:nosplit
@@ -477,9 +477,9 @@ func (v Value) Invoke(args ...any) Value {
477
477
478
478
// valueInvoke does a JavaScript call to value v with the given arguments.
479
479
//
480
- // (noescape): This is safe because the args slice is only used temporarily
481
- // to collect the JavaScript objects for the JavaScript method
482
- // invocation.
480
+ // Using go:noescape is safe because the args slice is only used temporarily
481
+ // to collect the JavaScript objects for the JavaScript method
482
+ // invocation.
483
483
//
484
484
//go:wasmimport gojs syscall/js.valueInvoke
485
485
//go:noescape
@@ -505,8 +505,8 @@ func (v Value) New(args ...any) Value {
505
505
506
506
// valueNew uses JavaScript's "new" operator with value v as a constructor and the given arguments.
507
507
//
508
- // (noescape): This is safe because the args slice is only used temporarily
509
- // to collect the JavaScript objects for the constructor execution.
508
+ // Using go:noescape is safe because the args slice is only used temporarily
509
+ // to collect the JavaScript objects for the constructor execution.
510
510
//
511
511
//go:wasmimport gojs syscall/js.valueNew
512
512
//go:noescape
@@ -614,8 +614,8 @@ func valuePrepareString(v ref) (ref, int)
614
614
615
615
// valueLoadString loads string data located at ref v into byte slice b.
616
616
//
617
- // (noescape): This is safe because the byte slice is only used as a destination
618
- // for storing the string data and references to it are not maintained.
617
+ // Using go:noescape is safe because the byte slice is only used as a destination
618
+ // for storing the string data and references to it are not maintained.
619
619
//
620
620
//go:wasmimport gojs syscall/js.valueLoadString
621
621
//go:noescape
@@ -658,8 +658,8 @@ func CopyBytesToGo(dst []byte, src Value) int {
658
658
659
659
// copyBytesToGo copies bytes from src to dst.
660
660
//
661
- // (noescape): This is safe because the dst byte slice is only used as a dst
662
- // copy buffer and no references to it are maintained.
661
+ // Using go:noescape is safe because the dst byte slice is only used as a dst
662
+ // copy buffer and no references to it are maintained.
663
663
//
664
664
//go:wasmimport gojs syscall/js.copyBytesToGo
665
665
//go:noescape
@@ -677,10 +677,10 @@ func CopyBytesToJS(dst Value, src []byte) int {
677
677
return n
678
678
}
679
679
680
- // copyBytesToJs copies bytes from src to dst.
680
+ // copyBytesToJS copies bytes from src to dst.
681
681
//
682
- // (noescape): This is safe because the src byte slice is only used as a src
683
- // copy buffer and no references to it are maintained.
682
+ // Using go:noescape is safe because the src byte slice is only used as a src
683
+ // copy buffer and no references to it are maintained.
684
684
//
685
685
//go:wasmimport gojs syscall/js.copyBytesToJS
686
686
//go:noescape
0 commit comments