Format script component

This commit is contained in:
chansuke 2018-09-18 23:24:15 +09:00 committed by Josh Matthews
parent 2ca7a13473
commit c37a345dc9
357 changed files with 25485 additions and 18076 deletions

View file

@ -12,22 +12,30 @@ use html5ever::{LocalName, Prefix};
#[dom_struct]
pub struct HTMLHtmlElement {
htmlelement: HTMLElement
htmlelement: HTMLElement,
}
impl HTMLHtmlElement {
fn new_inherited(localName: LocalName, prefix: Option<Prefix>, document: &Document) -> HTMLHtmlElement {
fn new_inherited(
localName: LocalName,
prefix: Option<Prefix>,
document: &Document,
) -> HTMLHtmlElement {
HTMLHtmlElement {
htmlelement: HTMLElement::new_inherited(localName, prefix, document)
htmlelement: HTMLElement::new_inherited(localName, prefix, document),
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: LocalName,
prefix: Option<Prefix>,
document: &Document) -> DomRoot<HTMLHtmlElement> {
Node::reflect_node(Box::new(HTMLHtmlElement::new_inherited(localName, prefix, document)),
document,
HTMLHtmlElementBinding::Wrap)
pub fn new(
localName: LocalName,
prefix: Option<Prefix>,
document: &Document,
) -> DomRoot<HTMLHtmlElement> {
Node::reflect_node(
Box::new(HTMLHtmlElement::new_inherited(localName, prefix, document)),
document,
HTMLHtmlElementBinding::Wrap,
)
}
}