web_sys/features/
gen_NodeFilter.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 = NodeFilter)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `NodeFilter` dictionary.\n\n*This API requires the following crate features to be activated: `NodeFilter`*"]
10 pub type NodeFilter;
11 #[doc = "Get the `acceptNode` field of this object.\n\n*This API requires the following crate features to be activated: `NodeFilter`*"]
12 #[wasm_bindgen(method, getter = "acceptNode")]
13 pub fn get_accept_node(this: &NodeFilter) -> Option<::js_sys::Function>;
14 #[doc = "Change the `acceptNode` field of this object.\n\n*This API requires the following crate features to be activated: `NodeFilter`*"]
15 #[wasm_bindgen(method, setter = "acceptNode")]
16 pub fn set_accept_node(this: &NodeFilter, val: &::js_sys::Function);
17}
18impl NodeFilter {
19 #[doc = "Construct a new `NodeFilter`.\n\n*This API requires the following crate features to be activated: `NodeFilter`*"]
20 pub fn new() -> Self {
21 #[allow(unused_mut)]
22 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
23 ret
24 }
25 #[deprecated = "Use `set_accept_node()` instead."]
26 pub fn accept_node(&mut self, val: &::js_sys::Function) -> &mut Self {
27 self.set_accept_node(val);
28 self
29 }
30}
31impl Default for NodeFilter {
32 fn default() -> Self {
33 Self::new()
34 }
35}