mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Format script component
This commit is contained in:
parent
2ca7a13473
commit
c37a345dc9
357 changed files with 25485 additions and 18076 deletions
|
@ -18,26 +18,33 @@ use html5ever::{LocalName, Prefix};
|
|||
|
||||
#[dom_struct]
|
||||
pub struct HTMLSourceElement {
|
||||
htmlelement: HTMLElement
|
||||
htmlelement: HTMLElement,
|
||||
}
|
||||
|
||||
impl HTMLSourceElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLSourceElement {
|
||||
fn new_inherited(
|
||||
local_name: LocalName,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document,
|
||||
) -> HTMLSourceElement {
|
||||
HTMLSourceElement {
|
||||
htmlelement:
|
||||
HTMLElement::new_inherited(local_name, prefix, document)
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> DomRoot<HTMLSourceElement> {
|
||||
Node::reflect_node(Box::new(HTMLSourceElement::new_inherited(local_name, prefix, document)),
|
||||
document,
|
||||
HTMLSourceElementBinding::Wrap)
|
||||
pub fn new(
|
||||
local_name: LocalName,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document,
|
||||
) -> DomRoot<HTMLSourceElement> {
|
||||
Node::reflect_node(
|
||||
Box::new(HTMLSourceElement::new_inherited(
|
||||
local_name, prefix, document,
|
||||
)),
|
||||
document,
|
||||
HTMLSourceElementBinding::Wrap,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -86,5 +93,4 @@ impl HTMLSourceElementMethods for HTMLSourceElement {
|
|||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-source-media
|
||||
make_setter!(SetMedia, "media");
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue