Skip to main content

script/dom/testing/
testns.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 js::context::JSContext;
8
9use crate::dom::bindings::codegen::Bindings::TestBindingBinding::TestNS_Binding;
10use crate::dom::bindings::root::DomRoot;
11use crate::dom::globalscope::GlobalScope;
12use crate::dom::testbinding::TestBinding;
13
14#[cfg_attr(crown, crown::unrooted_must_root_lint::must_root)]
15pub(crate) struct TestNS(());
16
17impl TestNS_Binding::TestNSMethods<crate::DomTypeHolder> for TestNS {
18    fn TestAttribute(cx: &mut JSContext, global_scope: &GlobalScope) -> DomRoot<TestBinding> {
19        TestBinding::new(cx, global_scope, None)
20    }
21}