Skip to main content

web_sys/features/
gen_NamedNodeMap.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 = "::js_sys::Object",
9        js_name = "NamedNodeMap",
10        typescript_type = "NamedNodeMap"
11    )]
12    #[derive(Debug, Clone, PartialEq, Eq)]
13    #[doc = "The `NamedNodeMap` class."]
14    #[doc = ""]
15    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NamedNodeMap)"]
16    #[doc = ""]
17    #[doc = "*This API requires the following crate features to be activated: `NamedNodeMap`*"]
18    pub type NamedNodeMap;
19    #[wasm_bindgen(method, getter, js_class = "NamedNodeMap", js_name = "length")]
20    #[doc = "Getter for the `length` field of this object."]
21    #[doc = ""]
22    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NamedNodeMap/length)"]
23    #[doc = ""]
24    #[doc = "*This API requires the following crate features to be activated: `NamedNodeMap`*"]
25    pub fn length(this: &NamedNodeMap) -> u32;
26    #[cfg(feature = "Attr")]
27    #[wasm_bindgen(method, js_class = "NamedNodeMap", js_name = "getNamedItem")]
28    #[doc = "The `getNamedItem()` method."]
29    #[doc = ""]
30    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NamedNodeMap/getNamedItem)"]
31    #[doc = ""]
32    #[doc = "*This API requires the following crate features to be activated: `Attr`, `NamedNodeMap`*"]
33    pub fn get_named_item(this: &NamedNodeMap, name: &str) -> Option<Attr>;
34    #[cfg(feature = "Attr")]
35    #[wasm_bindgen(method, js_class = "NamedNodeMap", js_name = "getNamedItemNS")]
36    #[doc = "The `getNamedItemNS()` method."]
37    #[doc = ""]
38    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NamedNodeMap/getNamedItemNS)"]
39    #[doc = ""]
40    #[doc = "*This API requires the following crate features to be activated: `Attr`, `NamedNodeMap`*"]
41    pub fn get_named_item_ns(
42        this: &NamedNodeMap,
43        namespace_uri: Option<&str>,
44        local_name: &str,
45    ) -> Option<Attr>;
46    #[cfg(feature = "Attr")]
47    #[wasm_bindgen(method, js_class = "NamedNodeMap")]
48    #[doc = "The `item()` method."]
49    #[doc = ""]
50    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NamedNodeMap/item)"]
51    #[doc = ""]
52    #[doc = "*This API requires the following crate features to be activated: `Attr`, `NamedNodeMap`*"]
53    pub fn item(this: &NamedNodeMap, index: u32) -> Option<Attr>;
54    #[cfg(feature = "Attr")]
55    #[wasm_bindgen(catch, method, js_class = "NamedNodeMap", js_name = "removeNamedItem")]
56    #[doc = "The `removeNamedItem()` method."]
57    #[doc = ""]
58    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NamedNodeMap/removeNamedItem)"]
59    #[doc = ""]
60    #[doc = "*This API requires the following crate features to be activated: `Attr`, `NamedNodeMap`*"]
61    pub fn remove_named_item(this: &NamedNodeMap, name: &str) -> Result<Attr, JsValue>;
62    #[cfg(feature = "Attr")]
63    #[wasm_bindgen(
64        catch,
65        method,
66        js_class = "NamedNodeMap",
67        js_name = "removeNamedItemNS"
68    )]
69    #[doc = "The `removeNamedItemNS()` method."]
70    #[doc = ""]
71    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NamedNodeMap/removeNamedItemNS)"]
72    #[doc = ""]
73    #[doc = "*This API requires the following crate features to be activated: `Attr`, `NamedNodeMap`*"]
74    pub fn remove_named_item_ns(
75        this: &NamedNodeMap,
76        namespace_uri: Option<&str>,
77        local_name: &str,
78    ) -> Result<Attr, JsValue>;
79    #[cfg(feature = "Attr")]
80    #[wasm_bindgen(catch, method, js_class = "NamedNodeMap", js_name = "setNamedItem")]
81    #[doc = "The `setNamedItem()` method."]
82    #[doc = ""]
83    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NamedNodeMap/setNamedItem)"]
84    #[doc = ""]
85    #[doc = "*This API requires the following crate features to be activated: `Attr`, `NamedNodeMap`*"]
86    pub fn set_named_item(this: &NamedNodeMap, arg: &Attr) -> Result<Option<Attr>, JsValue>;
87    #[cfg(feature = "Attr")]
88    #[wasm_bindgen(catch, method, js_class = "NamedNodeMap", js_name = "setNamedItemNS")]
89    #[doc = "The `setNamedItemNS()` method."]
90    #[doc = ""]
91    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NamedNodeMap/setNamedItemNS)"]
92    #[doc = ""]
93    #[doc = "*This API requires the following crate features to be activated: `Attr`, `NamedNodeMap`*"]
94    pub fn set_named_item_ns(this: &NamedNodeMap, arg: &Attr) -> Result<Option<Attr>, JsValue>;
95    #[cfg(feature = "Attr")]
96    #[wasm_bindgen(method, js_class = "NamedNodeMap", indexing_getter)]
97    #[doc = "Indexing getter. As in the literal Javascript `this[key]`."]
98    #[doc = ""]
99    #[doc = ""]
100    #[doc = "*This API requires the following crate features to be activated: `Attr`, `NamedNodeMap`*"]
101    pub fn get_with_name(this: &NamedNodeMap, name: &str) -> Option<Attr>;
102    #[cfg(feature = "Attr")]
103    #[wasm_bindgen(method, js_class = "NamedNodeMap", indexing_getter)]
104    #[doc = "Indexing getter. As in the literal Javascript `this[key]`."]
105    #[doc = ""]
106    #[doc = ""]
107    #[doc = "*This API requires the following crate features to be activated: `Attr`, `NamedNodeMap`*"]
108    pub fn get_with_index(this: &NamedNodeMap, index: u32) -> Option<Attr>;
109}