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