/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use dom_struct::dom_struct; use js::context::{JSContext, NoGC}; use script_bindings::codegen::GenericBindings::DocumentBinding::DocumentMethods; use script_bindings::codegen::GenericBindings::HTMLDocumentBinding::HTMLDocumentMethods; use script_bindings::root::DomRoot; use script_bindings::str::DOMString; use crate::dom::bindings::codegen::Bindings::DocumentBinding::NamedPropertyValue; use crate::dom::types::{Document, Location}; /// #[dom_struct] pub(crate) struct HTMLDocument { document: Document, } impl HTMLDocumentMethods for HTMLDocument { /// fn GetLocation(&self, cx: &mut JSContext) -> Option> { self.document.GetLocation(cx) } /// fn SupportedPropertyNames(&self, no_gc: &NoGC) -> Vec { self.document.SupportedPropertyNames(no_gc) } /// fn NamedGetter( &self, cx: &mut js::context::JSContext, name: DOMString, ) -> Option { self.document.NamedGetter(cx, name) } }