Skip to main content

web_sys/features/
gen_NodeList.rs

1#![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 (catch , method , structural , js_class = "NodeList" , js_name = forEach)]
23    #[doc = "The `forEach()` method."]
24    #[doc = ""]
25    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach)"]
26    #[doc = ""]
27    #[doc = "*This API requires the following crate features to be activated: `NodeList`*"]
28    pub fn for_each(this: &NodeList, callback: &::js_sys::Function) -> Result<(), JsValue>;
29    #[cfg(feature = "Node")]
30    # [wasm_bindgen (method , structural , js_class = "NodeList" , js_name = item)]
31    #[doc = "The `item()` method."]
32    #[doc = ""]
33    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NodeList/item)"]
34    #[doc = ""]
35    #[doc = "*This API requires the following crate features to be activated: `Node`, `NodeList`*"]
36    pub fn item(this: &NodeList, index: u32) -> Option<Node>;
37    #[cfg(feature = "Node")]
38    #[wasm_bindgen(method, structural, js_class = "NodeList", indexing_getter)]
39    #[doc = "Indexing getter. As in the literal Javascript `this[key]`."]
40    #[doc = ""]
41    #[doc = ""]
42    #[doc = ""]
43    #[doc = "*This API requires the following crate features to be activated: `Node`, `NodeList`*"]
44    pub fn get(this: &NodeList, index: u32) -> Option<Node>;
45    # [wasm_bindgen (method , structural , js_class = "NodeList" , js_name = entries)]
46    #[doc = "The `entries()` method."]
47    #[doc = ""]
48    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NodeList/entries)"]
49    #[doc = ""]
50    #[doc = "*This API requires the following crate features to be activated: `NodeList`*"]
51    pub fn entries(this: &NodeList) -> ::js_sys::Iterator;
52    # [wasm_bindgen (method , structural , js_class = "NodeList" , js_name = keys)]
53    #[doc = "The `keys()` method."]
54    #[doc = ""]
55    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NodeList/keys)"]
56    #[doc = ""]
57    #[doc = "*This API requires the following crate features to be activated: `NodeList`*"]
58    pub fn keys(this: &NodeList) -> ::js_sys::Iterator;
59    # [wasm_bindgen (method , structural , js_class = "NodeList" , js_name = values)]
60    #[doc = "The `values()` method."]
61    #[doc = ""]
62    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NodeList/values)"]
63    #[doc = ""]
64    #[doc = "*This API requires the following crate features to be activated: `NodeList`*"]
65    pub fn values(this: &NodeList) -> ::js_sys::Iterator;
66}