ByteLen returns the length of the ArrayBuffer.
()
| 341 | |
| 342 | // ByteLen returns the length of the ArrayBuffer. |
| 343 | func (v *Value) ByteLen() int64 { |
| 344 | byteLength := v.Get("byteLength") |
| 345 | defer byteLength.Free() |
| 346 | return byteLength.ToInt64() |
| 347 | } |
| 348 | |
| 349 | // Set sets the value of the property with the given name. |
| 350 | func (v *Value) Set(name string, val *Value) { |