diff --git a/wasm/demo/web/index.html b/wasm/demo/web/index.html index b97738e..81026df 100644 --- a/wasm/demo/web/index.html +++ b/wasm/demo/web/index.html @@ -48,17 +48,17 @@ let dater = Dater.new_with_dts(dts); document.write("

Date:

"); document.write("") - document.write("dts: " + dater.dts() + "
"); - document.write("dtsb: " + dater.dtsb() + "
"); - document.write("code: " + dater.code() + "
"); - document.write("size: " + dater.size() + "
"); - document.write("raw: " + dater.raw() + "
"); - document.write("qb64: " + dater.qb64() + "
"); - document.write("qb64b: " + dater.qb64b() + "
"); - document.write("qb2: " + dater.qb2() + "
"); + document.write("dts: " + dater.dts + "
"); + document.write("dtsb: " + dater.dtsb + "
"); + document.write("code: " + dater.code + "
"); + document.write("size: " + dater.size + "
"); + document.write("raw: " + dater.raw + "
"); + document.write("qb64: " + dater.qb64 + "
"); + document.write("qb64b: " + dater.qb64b + "
"); + document.write("qb2: " + dater.qb2 + "
"); try { dater = Dater.new_with_dts(dts = "asdf"); - document.write("Wrong dater: " + dater.dts() + "
"); + document.write("Wrong dater: " + dater.dts + "
"); } catch (error) { document.write("Error: " + error + "
"); document.write("Error name: " + error.name + "
"); diff --git a/wasm/src/primitives/dater.rs b/wasm/src/primitives/dater.rs index 2ea617d..94e2970 100644 --- a/wasm/src/primitives/dater.rs +++ b/wasm/src/primitives/dater.rs @@ -56,42 +56,42 @@ impl DaterWrapper { Ok(DaterWrapper(dater)) } - #[wasm_bindgen(method, getter)] + #[wasm_bindgen(getter)] pub fn dts(&self) -> Result { self.0.dts().as_js().map_err(JsValue::from) } - #[wasm_bindgen(method, getter)] + #[wasm_bindgen(getter)] pub fn dtsb(&self) -> Result> { self.0.dtsb().as_js().map_err(JsValue::from) } - #[wasm_bindgen(method, getter)] + #[wasm_bindgen(getter)] pub fn code(&self) -> String { self.0.code() } - #[wasm_bindgen(method, getter)] + #[wasm_bindgen(getter)] pub fn size(&self) -> u32 { self.0.size() } - #[wasm_bindgen(method, getter)] + #[wasm_bindgen(getter)] pub fn raw(&self) -> Vec { self.0.raw() } - #[wasm_bindgen(method, getter)] + #[wasm_bindgen(getter)] pub fn qb64(&self) -> Result { self.0.qb64().as_js().map_err(JsValue::from) } - #[wasm_bindgen(method, getter)] + #[wasm_bindgen(getter)] pub fn qb64b(&self) -> Result> { self.0.qb64b().as_js().map_err(JsValue::from) } - #[wasm_bindgen(method, getter)] + #[wasm_bindgen(getter)] pub fn qb2(&self) -> Result> { self.0.qb2().as_js().map_err(JsValue::from) }