web_sys/features/
gen_NodeList.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = NodeList , typescript_type = "NodeList")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `NodeList` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NodeList)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `NodeList`*"]
14 pub type NodeList;
15 # [wasm_bindgen (structural , method , getter , js_class = "NodeList" , js_name = length)]
16 #[doc = "Getter for the `length` field of this object."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NodeList/length)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `NodeList`*"]
21 pub fn length(this: &NodeList) -> u32;
22 # [wasm_bindgen (method , structural , js_class = "NodeList" , js_name = entries)]
23 #[doc = "The `entries()` method."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NodeList/entries)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `NodeList`*"]
28 pub fn entries(this: &NodeList) -> ::js_sys::Iterator;
29 # [wasm_bindgen (catch , method , structural , js_class = "NodeList" , js_name = forEach)]
30 #[doc = "The `forEach()` method."]
31 #[doc = ""]
32 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach)"]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `NodeList`*"]
35 pub fn for_each(this: &NodeList, callback: &::js_sys::Function) -> Result<(), JsValue>;
36 #[cfg(feature = "Node")]
37 # [wasm_bindgen (method , structural , js_class = "NodeList" , js_name = item)]
38 #[doc = "The `item()` method."]
39 #[doc = ""]
40 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NodeList/item)"]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `Node`, `NodeList`*"]
43 pub fn item(this: &NodeList, index: u32) -> Option<Node>;
44 # [wasm_bindgen (method , structural , js_class = "NodeList" , js_name = keys)]
45 #[doc = "The `keys()` method."]
46 #[doc = ""]
47 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NodeList/keys)"]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `NodeList`*"]
50 pub fn keys(this: &NodeList) -> ::js_sys::Iterator;
51 # [wasm_bindgen (method , structural , js_class = "NodeList" , js_name = values)]
52 #[doc = "The `values()` method."]
53 #[doc = ""]
54 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NodeList/values)"]
55 #[doc = ""]
56 #[doc = "*This API requires the following crate features to be activated: `NodeList`*"]
57 pub fn values(this: &NodeList) -> ::js_sys::Iterator;
58 #[cfg(feature = "Node")]
59 #[wasm_bindgen(method, structural, js_class = "NodeList", indexing_getter)]
60 #[doc = "Indexing getter. As in the literal Javascript `this[key]`."]
61 #[doc = ""]
62 #[doc = ""]
63 #[doc = ""]
64 #[doc = "*This API requires the following crate features to be activated: `Node`, `NodeList`*"]
65 pub fn get(this: &NodeList, index: u32) -> Option<Node>;
66}