web_sys/features/
gen_PerformanceNavigation.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "::js_sys::Object",
9 js_name = "PerformanceNavigation",
10 typescript_type = "PerformanceNavigation"
11 )]
12 #[derive(Debug, Clone, PartialEq, Eq)]
13 #[doc = "The `PerformanceNavigation` class."]
14 #[doc = ""]
15 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceNavigation)"]
16 #[doc = ""]
17 #[doc = "*This API requires the following crate features to be activated: `PerformanceNavigation`*"]
18 pub type PerformanceNavigation;
19 #[wasm_bindgen(method, getter, js_class = "PerformanceNavigation", js_name = "type")]
20 #[doc = "Getter for the `type` field of this object."]
21 #[doc = ""]
22 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceNavigation/type)"]
23 #[doc = ""]
24 #[doc = "*This API requires the following crate features to be activated: `PerformanceNavigation`*"]
25 pub fn type_(this: &PerformanceNavigation) -> u16;
26 #[wasm_bindgen(
27 method,
28 getter,
29 js_class = "PerformanceNavigation",
30 js_name = "redirectCount"
31 )]
32 #[doc = "Getter for the `redirectCount` field of this object."]
33 #[doc = ""]
34 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceNavigation/redirectCount)"]
35 #[doc = ""]
36 #[doc = "*This API requires the following crate features to be activated: `PerformanceNavigation`*"]
37 pub fn redirect_count(this: &PerformanceNavigation) -> u16;
38 #[wasm_bindgen(method, js_class = "PerformanceNavigation", js_name = "toJSON")]
39 #[doc = "The `toJSON()` method."]
40 #[doc = ""]
41 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceNavigation/toJSON)"]
42 #[doc = ""]
43 #[doc = "*This API requires the following crate features to be activated: `PerformanceNavigation`*"]
44 pub fn to_json(this: &PerformanceNavigation) -> ::js_sys::Object;
45}
46impl PerformanceNavigation {
47 #[doc = "The `PerformanceNavigation.TYPE_NAVIGATE` const."]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `PerformanceNavigation`*"]
50 pub const TYPE_NAVIGATE: u16 = 0i64 as u16;
51 #[doc = "The `PerformanceNavigation.TYPE_RELOAD` const."]
52 #[doc = ""]
53 #[doc = "*This API requires the following crate features to be activated: `PerformanceNavigation`*"]
54 pub const TYPE_RELOAD: u16 = 1u64 as u16;
55 #[doc = "The `PerformanceNavigation.TYPE_BACK_FORWARD` const."]
56 #[doc = ""]
57 #[doc = "*This API requires the following crate features to be activated: `PerformanceNavigation`*"]
58 pub const TYPE_BACK_FORWARD: u16 = 2u64 as u16;
59 #[doc = "The `PerformanceNavigation.TYPE_RESERVED` const."]
60 #[doc = ""]
61 #[doc = "*This API requires the following crate features to be activated: `PerformanceNavigation`*"]
62 pub const TYPE_RESERVED: u16 = 255u64 as u16;
63}