script/dom/
testbindingproxy.rs

1/* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
5// check-tidy: no specs after this line
6
7use dom_struct::dom_struct;
8
9use crate::dom::bindings::codegen::Bindings::TestBindingProxyBinding::TestBindingProxyMethods;
10use crate::dom::bindings::str::DOMString;
11use crate::dom::testbinding::TestBinding;
12
13#[dom_struct]
14pub(crate) struct TestBindingProxy {
15    testbinding_: TestBinding,
16}
17
18impl TestBindingProxyMethods<crate::DomTypeHolder> for TestBindingProxy {
19    fn Length(&self) -> u32 {
20        0
21    }
22    fn SupportedPropertyNames(&self) -> Vec<DOMString> {
23        vec![]
24    }
25    fn GetNamedItem(&self, _: DOMString) -> DOMString {
26        DOMString::new()
27    }
28    fn SetNamedItem(&self, _: DOMString, _: DOMString) {}
29    fn GetItem(&self, _: u32) -> DOMString {
30        DOMString::new()
31    }
32    fn SetItem(&self, _: u32, _: DOMString) {}
33    fn RemoveItem(&self, _: DOMString) {}
34    fn Stringifier(&self) -> DOMString {
35        DOMString::new()
36    }
37    fn IndexedGetter(&self, _: u32) -> Option<DOMString> {
38        None
39    }
40    fn NamedDeleter(&self, _: DOMString) {}
41    fn IndexedSetter(&self, _: u32, _: DOMString) {}
42    fn NamedSetter(&self, _: DOMString, _: DOMString) {}
43    fn NamedGetter(&self, _: DOMString) -> Option<DOMString> {
44        None
45    }
46}