From e568a2369fa170653ef0f38d791a2d065629be85 Mon Sep 17 00:00:00 2001 From: Liigo Zhuang Date: Wed, 11 Jul 2018 13:03:25 +0800 Subject: [PATCH] `buffer` / `byteOffset` / `byteLenght` is property getter --- src/js.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js.rs b/src/js.rs index a1b85978f..dca554c43 100644 --- a/src/js.rs +++ b/src/js.rs @@ -394,21 +394,21 @@ extern "C" { /// The ArrayBuffer referenced by this view. Fixed at construction time and thus read only. /// /// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/buffer - #[wasm_bindgen(method)] + #[wasm_bindgen(method, getter, structural)] pub fn buffer(this: &DataView) -> ArrayBuffer; /// The length (in bytes) of this view from the start of its ArrayBuffer. /// Fixed at construction time and thus read only. /// /// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/byteLength - #[wasm_bindgen(method, js_name = byteLength)] + #[wasm_bindgen(method, getter, structural, js_name = byteLength)] pub fn byte_length(this: &DataView) -> usize; /// The offset (in bytes) of this view from the start of its ArrayBuffer. /// Fixed at construction time and thus read only. /// /// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/byteOffset - #[wasm_bindgen(method, js_name = byteOffset)] + #[wasm_bindgen(method, getter, structural, js_name = byteOffset)] pub fn byte_offset(this: &DataView) -> usize; /// The getInt8() method gets a signed 8-bit integer (byte) at the