internal/jsutil: bug fix: unnecessary allocations of temporary ArrayBuffers
internal/jsutil: bug fix: unnecessary allocations of temporary ArrayBuffers

Closes #2156

hajimehoshi/ebiten,hajimehoshi/ebiten