Skip to main content

web_sys/features/
gen_HashChangeEvent.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 = "HashChangeEvent",
11        typescript_type = "HashChangeEvent"
12    )]
13    #[derive(Debug, Clone, PartialEq, Eq)]
14    #[doc = "The `HashChangeEvent` class."]
15    #[doc = ""]
16    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HashChangeEvent)"]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `HashChangeEvent`*"]
19    pub type HashChangeEvent;
20    #[wasm_bindgen(method, getter, js_class = "HashChangeEvent", js_name = "oldURL")]
21    #[doc = "Getter for the `oldURL` field of this object."]
22    #[doc = ""]
23    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HashChangeEvent/oldURL)"]
24    #[doc = ""]
25    #[doc = "*This API requires the following crate features to be activated: `HashChangeEvent`*"]
26    pub fn old_url(this: &HashChangeEvent) -> ::alloc::string::String;
27    #[wasm_bindgen(method, getter, js_class = "HashChangeEvent", js_name = "newURL")]
28    #[doc = "Getter for the `newURL` field of this object."]
29    #[doc = ""]
30    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HashChangeEvent/newURL)"]
31    #[doc = ""]
32    #[doc = "*This API requires the following crate features to be activated: `HashChangeEvent`*"]
33    pub fn new_url(this: &HashChangeEvent) -> ::alloc::string::String;
34    #[wasm_bindgen(catch, constructor, js_class = "HashChangeEvent")]
35    #[doc = "The `new HashChangeEvent(..)` constructor, creating a new instance of `HashChangeEvent`."]
36    #[doc = ""]
37    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HashChangeEvent/HashChangeEvent)"]
38    #[doc = ""]
39    #[doc = "*This API requires the following crate features to be activated: `HashChangeEvent`*"]
40    pub fn new(type_: &str) -> Result<HashChangeEvent, JsValue>;
41    #[cfg(feature = "HashChangeEventInit")]
42    #[wasm_bindgen(catch, constructor, js_class = "HashChangeEvent")]
43    #[doc = "The `new HashChangeEvent(..)` constructor, creating a new instance of `HashChangeEvent`."]
44    #[doc = ""]
45    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HashChangeEvent/HashChangeEvent)"]
46    #[doc = ""]
47    #[doc = "*This API requires the following crate features to be activated: `HashChangeEvent`, `HashChangeEventInit`*"]
48    pub fn new_with_event_init_dict(
49        type_: &str,
50        event_init_dict: &HashChangeEventInit,
51    ) -> Result<HashChangeEvent, JsValue>;
52    #[wasm_bindgen(method, js_class = "HashChangeEvent", js_name = "initHashChangeEvent")]
53    #[doc = "The `initHashChangeEvent()` method."]
54    #[doc = ""]
55    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HashChangeEvent/initHashChangeEvent)"]
56    #[doc = ""]
57    #[doc = "*This API requires the following crate features to be activated: `HashChangeEvent`*"]
58    pub fn init_hash_change_event(this: &HashChangeEvent, type_arg: &str);
59    #[wasm_bindgen(method, js_class = "HashChangeEvent", js_name = "initHashChangeEvent")]
60    #[doc = "The `initHashChangeEvent()` method."]
61    #[doc = ""]
62    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HashChangeEvent/initHashChangeEvent)"]
63    #[doc = ""]
64    #[doc = "*This API requires the following crate features to be activated: `HashChangeEvent`*"]
65    pub fn init_hash_change_event_with_can_bubble_arg(
66        this: &HashChangeEvent,
67        type_arg: &str,
68        can_bubble_arg: bool,
69    );
70    #[wasm_bindgen(method, js_class = "HashChangeEvent", js_name = "initHashChangeEvent")]
71    #[doc = "The `initHashChangeEvent()` method."]
72    #[doc = ""]
73    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HashChangeEvent/initHashChangeEvent)"]
74    #[doc = ""]
75    #[doc = "*This API requires the following crate features to be activated: `HashChangeEvent`*"]
76    pub fn init_hash_change_event_with_can_bubble_arg_and_cancelable_arg(
77        this: &HashChangeEvent,
78        type_arg: &str,
79        can_bubble_arg: bool,
80        cancelable_arg: bool,
81    );
82    #[wasm_bindgen(method, js_class = "HashChangeEvent", js_name = "initHashChangeEvent")]
83    #[doc = "The `initHashChangeEvent()` method."]
84    #[doc = ""]
85    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HashChangeEvent/initHashChangeEvent)"]
86    #[doc = ""]
87    #[doc = "*This API requires the following crate features to be activated: `HashChangeEvent`*"]
88    pub fn init_hash_change_event_with_can_bubble_arg_and_cancelable_arg_and_old_url_arg(
89        this: &HashChangeEvent,
90        type_arg: &str,
91        can_bubble_arg: bool,
92        cancelable_arg: bool,
93        old_url_arg: &str,
94    );
95    #[wasm_bindgen(method, js_class = "HashChangeEvent", js_name = "initHashChangeEvent")]
96    #[doc = "The `initHashChangeEvent()` method."]
97    #[doc = ""]
98    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HashChangeEvent/initHashChangeEvent)"]
99    #[doc = ""]
100    #[doc = "*This API requires the following crate features to be activated: `HashChangeEvent`*"]
101    pub fn init_hash_change_event_with_can_bubble_arg_and_cancelable_arg_and_old_url_arg_and_new_url_arg(
102        this: &HashChangeEvent,
103        type_arg: &str,
104        can_bubble_arg: bool,
105        cancelable_arg: bool,
106        old_url_arg: &str,
107        new_url_arg: &str,
108    );
109}