script/dom/html/
htmlparamelement.rs1use dom_struct::dom_struct;
6use html5ever::{LocalName, Prefix};
7use js::rust::HandleObject;
8
9use crate::dom::bindings::root::DomRoot;
10use crate::dom::document::Document;
11use crate::dom::html::htmlelement::HTMLElement;
12use crate::dom::node::Node;
13use crate::script_runtime::CanGc;
14
15#[dom_struct]
16pub(crate) struct HTMLParamElement {
17 htmlelement: HTMLElement,
18}
19
20impl HTMLParamElement {
21 fn new_inherited(
22 local_name: LocalName,
23 prefix: Option<Prefix>,
24 document: &Document,
25 ) -> HTMLParamElement {
26 HTMLParamElement {
27 htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
28 }
29 }
30
31 #[cfg_attr(crown, allow(crown::unrooted_must_root))]
32 pub(crate) fn new(
33 local_name: LocalName,
34 prefix: Option<Prefix>,
35 document: &Document,
36 proto: Option<HandleObject>,
37 can_gc: CanGc,
38 ) -> DomRoot<HTMLParamElement> {
39 Node::reflect_node_with_proto(
40 Box::new(HTMLParamElement::new_inherited(
41 local_name, prefix, document,
42 )),
43 document,
44 proto,
45 can_gc,
46 )
47 }
48}