Skip to main content

web_sys/features/
gen_IdbVersionChangeEvent.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    #[wasm_bindgen(
8        extends = "Event",
9        extends = "::js_sys::Object",
10        js_name = "IDBVersionChangeEvent",
11        typescript_type = "IDBVersionChangeEvent"
12    )]
13    #[derive(Debug, Clone, PartialEq, Eq)]
14    #[doc = "The `IdbVersionChangeEvent` class."]
15    #[doc = ""]
16    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBVersionChangeEvent)"]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEvent`*"]
19    pub type IdbVersionChangeEvent;
20    #[wasm_bindgen(
21        method,
22        getter,
23        js_class = "IDBVersionChangeEvent",
24        js_name = "oldVersion"
25    )]
26    #[doc = "Getter for the `oldVersion` field of this object."]
27    #[doc = ""]
28    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBVersionChangeEvent/oldVersion)"]
29    #[doc = ""]
30    #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEvent`*"]
31    pub fn old_version(this: &IdbVersionChangeEvent) -> f64;
32    #[wasm_bindgen(
33        method,
34        getter,
35        js_class = "IDBVersionChangeEvent",
36        js_name = "newVersion"
37    )]
38    #[doc = "Getter for the `newVersion` field of this object."]
39    #[doc = ""]
40    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBVersionChangeEvent/newVersion)"]
41    #[doc = ""]
42    #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEvent`*"]
43    pub fn new_version(this: &IdbVersionChangeEvent) -> Option<f64>;
44    #[wasm_bindgen(catch, constructor, js_class = "IDBVersionChangeEvent")]
45    #[doc = "The `new IdbVersionChangeEvent(..)` constructor, creating a new instance of `IdbVersionChangeEvent`."]
46    #[doc = ""]
47    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBVersionChangeEvent/IDBVersionChangeEvent)"]
48    #[doc = ""]
49    #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEvent`*"]
50    pub fn new(type_: &str) -> Result<IdbVersionChangeEvent, JsValue>;
51    #[cfg(feature = "IdbVersionChangeEventInit")]
52    #[wasm_bindgen(catch, constructor, js_class = "IDBVersionChangeEvent")]
53    #[doc = "The `new IdbVersionChangeEvent(..)` constructor, creating a new instance of `IdbVersionChangeEvent`."]
54    #[doc = ""]
55    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBVersionChangeEvent/IDBVersionChangeEvent)"]
56    #[doc = ""]
57    #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEvent`, `IdbVersionChangeEventInit`*"]
58    pub fn new_with_event_init_dict(
59        type_: &str,
60        event_init_dict: &IdbVersionChangeEventInit,
61    ) -> Result<IdbVersionChangeEvent, JsValue>;
62}