mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-13 21:11:22 +00:00
some fix
This commit is contained in:
@ -418,7 +418,7 @@ extern "C" {
|
|||||||
#[wasm_bindgen(method, js_name = getInt8)]
|
#[wasm_bindgen(method, js_name = getInt8)]
|
||||||
pub fn get_int8(this: &DataView, byte_offset: usize) -> i8;
|
pub fn get_int8(this: &DataView, byte_offset: usize) -> i8;
|
||||||
|
|
||||||
/// The getInt8() method gets a signed 8-bit integer (byte) at the specified
|
/// The getUint8() method gets a unsigned 8-bit integer (byte) at the specified
|
||||||
/// byte offset from the start of the DataView.
|
/// byte offset from the start of the DataView.
|
||||||
///
|
///
|
||||||
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/getUint8
|
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/getUint8
|
||||||
|
@ -45,7 +45,7 @@ fn test() {
|
|||||||
import * as wasm from "./out";
|
import * as wasm from "./out";
|
||||||
|
|
||||||
export function test() {
|
export function test() {
|
||||||
var bytes = new Int8Array(10);
|
const bytes = new Int8Array(10);
|
||||||
bytes[2] = 2;
|
bytes[2] = 2;
|
||||||
wasm.test_data_view(bytes.buffer, 2, 8);
|
wasm.test_data_view(bytes.buffer, 2, 8);
|
||||||
assert.equal(bytes[2], 42);
|
assert.equal(bytes[2], 42);
|
||||||
|
Reference in New Issue
Block a user