mirror of
https://github.com/servo/servo.git
synced 2025-06-24 09:04:33 +01:00
Use DOMString more consistently.
This commit is contained in:
parent
a0a61fe976
commit
0f5c9a35b9
76 changed files with 161 additions and 146 deletions
|
@ -11,11 +11,11 @@ use dom::node::{Node, NodeTypeId};
|
|||
|
||||
pub struct CharacterData {
|
||||
node: Node,
|
||||
data: ~str
|
||||
data: DOMString,
|
||||
}
|
||||
|
||||
impl CharacterData {
|
||||
pub fn new_inherited(id: NodeTypeId, data: ~str, document: AbstractDocument) -> CharacterData {
|
||||
pub fn new_inherited(id: NodeTypeId, data: DOMString, document: AbstractDocument) -> CharacterData {
|
||||
CharacterData {
|
||||
node: Node::new_inherited(id, document),
|
||||
data: data
|
||||
|
|
|
@ -15,13 +15,13 @@ pub struct Comment {
|
|||
}
|
||||
|
||||
impl Comment {
|
||||
pub fn new_inherited(text: ~str, document: AbstractDocument) -> Comment {
|
||||
pub fn new_inherited(text: DOMString, document: AbstractDocument) -> Comment {
|
||||
Comment {
|
||||
element: CharacterData::new_inherited(CommentNodeTypeId, text, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(text: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(text: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let node = Comment::new_inherited(text, document);
|
||||
Node::reflect_node(@mut node, document, CommentBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -132,7 +132,7 @@ pub struct Event {
|
|||
reflector_: Reflector,
|
||||
current_target: Option<AbstractEventTarget>,
|
||||
target: Option<AbstractEventTarget>,
|
||||
type_: ~str,
|
||||
type_: DOMString,
|
||||
phase: EventPhase,
|
||||
default_prevented: bool,
|
||||
stop_propagation: bool,
|
||||
|
|
|
@ -36,7 +36,7 @@ struct EventListenerEntry {
|
|||
pub struct EventTarget {
|
||||
type_id: EventTargetTypeId,
|
||||
reflector_: Reflector,
|
||||
handlers: HashMap<~str, ~[EventListenerEntry]>,
|
||||
handlers: HashMap<DOMString, ~[EventListenerEntry]>,
|
||||
}
|
||||
|
||||
pub struct AbstractEventTarget {
|
||||
|
|
|
@ -17,7 +17,7 @@ enum FormDatum {
|
|||
}
|
||||
|
||||
pub struct FormData {
|
||||
data: HashMap<~str, FormDatum>,
|
||||
data: HashMap<DOMString, FormDatum>,
|
||||
reflector_: Reflector,
|
||||
window: @mut Window,
|
||||
form: Option<AbstractNode>
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLAnchorElement {
|
|||
}
|
||||
|
||||
impl HTMLAnchorElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLAnchorElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLAnchorElement {
|
||||
HTMLAnchorElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLAnchorElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLAnchorElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLAnchorElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLAppletElement {
|
|||
}
|
||||
|
||||
impl HTMLAppletElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLAppletElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLAppletElement {
|
||||
HTMLAppletElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLAppletElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLAppletElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLAppletElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLAreaElement {
|
|||
}
|
||||
|
||||
impl HTMLAreaElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLAreaElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLAreaElement {
|
||||
HTMLAreaElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLAreaElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLAreaElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLAreaElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::HTMLAudioElementBinding;
|
||||
use dom::bindings::utils::DOMString;
|
||||
use dom::document::AbstractDocument;
|
||||
use dom::element::HTMLAudioElementTypeId;
|
||||
use dom::htmlmediaelement::HTMLMediaElement;
|
||||
|
@ -13,13 +14,13 @@ pub struct HTMLAudioElement {
|
|||
}
|
||||
|
||||
impl HTMLAudioElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLAudioElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLAudioElement {
|
||||
HTMLAudioElement {
|
||||
htmlmediaelement: HTMLMediaElement::new_inherited(HTMLAudioElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLAudioElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLAudioElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLBaseElement {
|
|||
}
|
||||
|
||||
impl HTMLBaseElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLBaseElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLBaseElement {
|
||||
HTMLBaseElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLBaseElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLBaseElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLBaseElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLBodyElement {
|
|||
}
|
||||
|
||||
impl HTMLBodyElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLBodyElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLBodyElement {
|
||||
HTMLBodyElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLBodyElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLBodyElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLBodyElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLBRElement {
|
|||
}
|
||||
|
||||
impl HTMLBRElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLBRElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLBRElement {
|
||||
HTMLBRElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLBRElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLBRElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLBRElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -15,13 +15,13 @@ pub struct HTMLButtonElement {
|
|||
}
|
||||
|
||||
impl HTMLButtonElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLButtonElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLButtonElement {
|
||||
HTMLButtonElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLButtonElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLButtonElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLButtonElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::HTMLCanvasElementBinding;
|
||||
use dom::bindings::utils::DOMString;
|
||||
use dom::bindings::utils::{ErrorResult};
|
||||
use dom::document::AbstractDocument;
|
||||
use dom::element::HTMLCanvasElementTypeId;
|
||||
|
@ -14,13 +15,13 @@ pub struct HTMLCanvasElement {
|
|||
}
|
||||
|
||||
impl HTMLCanvasElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLCanvasElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLCanvasElement {
|
||||
HTMLCanvasElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLCanvasElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLCanvasElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLCanvasElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLDataElement {
|
|||
}
|
||||
|
||||
impl HTMLDataElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLDataElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLDataElement {
|
||||
HTMLDataElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLDataElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLDataElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLDataElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::HTMLDataListElementBinding;
|
||||
use dom::bindings::utils::DOMString;
|
||||
use dom::document::AbstractDocument;
|
||||
use dom::element::HTMLDataListElementTypeId;
|
||||
use dom::htmlcollection::HTMLCollection;
|
||||
|
@ -14,13 +15,13 @@ pub struct HTMLDataListElement {
|
|||
}
|
||||
|
||||
impl HTMLDataListElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLDataListElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLDataListElement {
|
||||
HTMLDataListElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLDataListElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLDataListElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLDataListElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::HTMLDirectoryElementBinding;
|
||||
use dom::bindings::utils::DOMString;
|
||||
use dom::bindings::utils::ErrorResult;
|
||||
use dom::document::AbstractDocument;
|
||||
use dom::element::HTMLDirectoryElementTypeId;
|
||||
|
@ -14,13 +15,13 @@ pub struct HTMLDirectoryElement {
|
|||
}
|
||||
|
||||
impl HTMLDirectoryElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLDirectoryElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLDirectoryElement {
|
||||
HTMLDirectoryElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLDirectoryElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLDirectoryElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLDirectoryElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLDivElement {
|
|||
}
|
||||
|
||||
impl HTMLDivElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLDivElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLDivElement {
|
||||
HTMLDivElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLDivElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLDivElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLDivElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLDListElement {
|
|||
}
|
||||
|
||||
impl HTMLDListElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLDListElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLDListElement {
|
||||
HTMLDListElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLDListElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLDListElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLDListElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -16,13 +16,13 @@ pub struct HTMLElement {
|
|||
}
|
||||
|
||||
impl HTMLElement {
|
||||
pub fn new_inherited(type_id: ElementTypeId, tag_name: ~str, document: AbstractDocument) -> HTMLElement {
|
||||
pub fn new_inherited(type_id: ElementTypeId, tag_name: DOMString, document: AbstractDocument) -> HTMLElement {
|
||||
HTMLElement {
|
||||
element: Element::new_inherited(type_id, tag_name, namespace::HTML, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLElement::new_inherited(HTMLElementTypeId, localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLEmbedElement {
|
|||
}
|
||||
|
||||
impl HTMLEmbedElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLEmbedElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLEmbedElement {
|
||||
HTMLEmbedElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLEmbedElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLEmbedElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLEmbedElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -16,13 +16,13 @@ pub struct HTMLFieldSetElement {
|
|||
}
|
||||
|
||||
impl HTMLFieldSetElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLFieldSetElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLFieldSetElement {
|
||||
HTMLFieldSetElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLFieldSetElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLFieldSetElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLFieldSetElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLFontElement {
|
|||
}
|
||||
|
||||
impl HTMLFontElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLFontElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLFontElement {
|
||||
HTMLFontElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLFontElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLFontElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLFontElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -15,13 +15,13 @@ pub struct HTMLFormElement {
|
|||
}
|
||||
|
||||
impl HTMLFormElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLFormElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLFormElement {
|
||||
HTMLFormElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLFormElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLFormElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLFormElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -15,13 +15,13 @@ pub struct HTMLFrameElement {
|
|||
}
|
||||
|
||||
impl HTMLFrameElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLFrameElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLFrameElement {
|
||||
HTMLFrameElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLFrameElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLFrameElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLFrameElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLFrameSetElement {
|
|||
}
|
||||
|
||||
impl HTMLFrameSetElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLFrameSetElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLFrameSetElement {
|
||||
HTMLFrameSetElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLFrameSetElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLFrameSetElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLFrameSetElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::HTMLHeadElementBinding;
|
||||
use dom::bindings::utils::DOMString;
|
||||
use dom::document::AbstractDocument;
|
||||
use dom::element::HTMLHeadElementTypeId;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
|
@ -13,13 +14,13 @@ pub struct HTMLHeadElement {
|
|||
}
|
||||
|
||||
impl HTMLHeadElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLHeadElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLHeadElement {
|
||||
HTMLHeadElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLHeadElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLHeadElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLHeadElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -24,14 +24,14 @@ pub struct HTMLHeadingElement {
|
|||
}
|
||||
|
||||
impl HTMLHeadingElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument, level: HeadingLevel) -> HTMLHeadingElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument, level: HeadingLevel) -> HTMLHeadingElement {
|
||||
HTMLHeadingElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLHeadingElementTypeId, localName, document),
|
||||
level: level,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument, level: HeadingLevel) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument, level: HeadingLevel) -> AbstractNode {
|
||||
let element = HTMLHeadingElement::new_inherited(localName, document, level);
|
||||
Node::reflect_node(@mut element, document, HTMLHeadingElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLHRElement {
|
|||
}
|
||||
|
||||
impl HTMLHRElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLHRElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLHRElement {
|
||||
HTMLHRElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLHRElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLHRElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLHRElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLHtmlElement {
|
|||
}
|
||||
|
||||
impl HTMLHtmlElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLHtmlElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLHtmlElement {
|
||||
HTMLHtmlElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLHtmlElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLHtmlElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLHtmlElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ impl HTMLIFrameElement {
|
|||
}
|
||||
|
||||
impl HTMLIFrameElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLIFrameElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLIFrameElement {
|
||||
HTMLIFrameElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLIframeElementTypeId, localName, document),
|
||||
frame: None,
|
||||
|
@ -52,7 +52,7 @@ impl HTMLIFrameElement {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLIFrameElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLIFrameElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -22,14 +22,14 @@ pub struct HTMLImageElement {
|
|||
}
|
||||
|
||||
impl HTMLImageElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLImageElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLImageElement {
|
||||
HTMLImageElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLImageElementTypeId, localName, document),
|
||||
image: None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLImageElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLImageElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLInputElement {
|
|||
}
|
||||
|
||||
impl HTMLInputElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLInputElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLInputElement {
|
||||
HTMLInputElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLInputElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLInputElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLInputElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLLabelElement {
|
|||
}
|
||||
|
||||
impl HTMLLabelElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLLabelElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLLabelElement {
|
||||
HTMLLabelElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLLabelElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLLabelElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLLabelElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLLegendElement {
|
|||
}
|
||||
|
||||
impl HTMLLegendElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLLegendElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLLegendElement {
|
||||
HTMLLegendElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLLegendElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLLegendElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLLegendElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLLIElement {
|
|||
}
|
||||
|
||||
impl HTMLLIElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLLIElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLLIElement {
|
||||
HTMLLIElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLLIElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLLIElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLLIElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLLinkElement {
|
|||
}
|
||||
|
||||
impl HTMLLinkElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLLinkElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLLinkElement {
|
||||
HTMLLinkElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLLinkElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLLinkElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLLinkElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::HTMLMainElementBinding;
|
||||
use dom::bindings::utils::DOMString;
|
||||
use dom::document::AbstractDocument;
|
||||
use dom::element::HTMLMainElementTypeId;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
|
@ -13,13 +14,13 @@ pub struct HTMLMainElement {
|
|||
}
|
||||
|
||||
impl HTMLMainElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLMainElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLMainElement {
|
||||
HTMLMainElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLMainElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLMainElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLMainElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -15,13 +15,13 @@ pub struct HTMLMapElement {
|
|||
}
|
||||
|
||||
impl HTMLMapElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLMapElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLMapElement {
|
||||
HTMLMapElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLMapElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLMapElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLMapElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ pub struct HTMLMediaElement {
|
|||
}
|
||||
|
||||
impl HTMLMediaElement {
|
||||
pub fn new_inherited(type_id: ElementTypeId, tag_name: ~str, document: AbstractDocument) -> HTMLMediaElement {
|
||||
pub fn new_inherited(type_id: ElementTypeId, tag_name: DOMString, document: AbstractDocument) -> HTMLMediaElement {
|
||||
HTMLMediaElement {
|
||||
htmlelement: HTMLElement::new_inherited(type_id, tag_name, document)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLMetaElement {
|
|||
}
|
||||
|
||||
impl HTMLMetaElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLMetaElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLMetaElement {
|
||||
HTMLMetaElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLMetaElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLMetaElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLMetaElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::HTMLMeterElementBinding;
|
||||
use dom::bindings::utils::DOMString;
|
||||
use dom::bindings::utils::ErrorResult;
|
||||
use dom::document::AbstractDocument;
|
||||
use dom::element::HTMLMeterElementTypeId;
|
||||
|
@ -14,13 +15,13 @@ pub struct HTMLMeterElement {
|
|||
}
|
||||
|
||||
impl HTMLMeterElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLMeterElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLMeterElement {
|
||||
HTMLMeterElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLMeterElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLMeterElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLMeterElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLModElement {
|
|||
}
|
||||
|
||||
impl HTMLModElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLModElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLModElement {
|
||||
HTMLModElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLModElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLModElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLModElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -16,13 +16,13 @@ pub struct HTMLObjectElement {
|
|||
}
|
||||
|
||||
impl HTMLObjectElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLObjectElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLObjectElement {
|
||||
HTMLObjectElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLObjectElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLObjectElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLObjectElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLOListElement {
|
|||
}
|
||||
|
||||
impl HTMLOListElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLOListElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLOListElement {
|
||||
HTMLOListElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLOListElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLOListElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLOListElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLOptGroupElement {
|
|||
}
|
||||
|
||||
impl HTMLOptGroupElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLOptGroupElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLOptGroupElement {
|
||||
HTMLOptGroupElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLOptGroupElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLOptGroupElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLOptGroupElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLOptionElement {
|
|||
}
|
||||
|
||||
impl HTMLOptionElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLOptionElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLOptionElement {
|
||||
HTMLOptionElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLOptionElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLOptionElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLOptionElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -15,13 +15,13 @@ pub struct HTMLOutputElement {
|
|||
}
|
||||
|
||||
impl HTMLOutputElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLOutputElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLOutputElement {
|
||||
HTMLOutputElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLOutputElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLOutputElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLOutputElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLParagraphElement {
|
|||
}
|
||||
|
||||
impl HTMLParagraphElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLParagraphElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLParagraphElement {
|
||||
HTMLParagraphElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLParagraphElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLParagraphElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLParagraphElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLParamElement {
|
|||
}
|
||||
|
||||
impl HTMLParamElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLParamElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLParamElement {
|
||||
HTMLParamElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLParamElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLParamElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLParamElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::HTMLPreElementBinding;
|
||||
use dom::bindings::utils::DOMString;
|
||||
use dom::bindings::utils::{ErrorResult};
|
||||
use dom::document::AbstractDocument;
|
||||
use dom::element::HTMLPreElementTypeId;
|
||||
|
@ -14,13 +15,13 @@ pub struct HTMLPreElement {
|
|||
}
|
||||
|
||||
impl HTMLPreElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLPreElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLPreElement {
|
||||
HTMLPreElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLPreElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLPreElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLPreElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::HTMLProgressElementBinding;
|
||||
use dom::bindings::utils::DOMString;
|
||||
use dom::bindings::utils::{ErrorResult, Fallible};
|
||||
use dom::document::AbstractDocument;
|
||||
use dom::element::HTMLProgressElementTypeId;
|
||||
|
@ -14,13 +15,13 @@ pub struct HTMLProgressElement {
|
|||
}
|
||||
|
||||
impl HTMLProgressElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLProgressElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLProgressElement {
|
||||
HTMLProgressElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLProgressElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLProgressElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLProgressElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLQuoteElement {
|
|||
}
|
||||
|
||||
impl HTMLQuoteElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLQuoteElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLQuoteElement {
|
||||
HTMLQuoteElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLQuoteElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLQuoteElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLQuoteElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLScriptElement {
|
|||
}
|
||||
|
||||
impl HTMLScriptElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLScriptElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLScriptElement {
|
||||
HTMLScriptElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLScriptElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLScriptElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLScriptElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -15,13 +15,13 @@ pub struct HTMLSelectElement {
|
|||
}
|
||||
|
||||
impl HTMLSelectElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLSelectElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLSelectElement {
|
||||
HTMLSelectElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLSelectElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLSelectElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLSelectElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLSourceElement {
|
|||
}
|
||||
|
||||
impl HTMLSourceElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLSourceElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLSourceElement {
|
||||
HTMLSourceElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLSourceElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLSourceElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLSourceElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::HTMLSpanElementBinding;
|
||||
use dom::bindings::utils::DOMString;
|
||||
use dom::document::AbstractDocument;
|
||||
use dom::element::HTMLSpanElementTypeId;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
|
@ -13,13 +14,13 @@ pub struct HTMLSpanElement {
|
|||
}
|
||||
|
||||
impl HTMLSpanElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLSpanElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLSpanElement {
|
||||
HTMLSpanElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLSpanElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLSpanElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLSpanElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLStyleElement {
|
|||
}
|
||||
|
||||
impl HTMLStyleElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLStyleElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLStyleElement {
|
||||
HTMLStyleElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLStyleElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLStyleElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLStyleElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLTableCaptionElement {
|
|||
}
|
||||
|
||||
impl HTMLTableCaptionElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTableCaptionElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLTableCaptionElement {
|
||||
HTMLTableCaptionElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLTableCaptionElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLTableCaptionElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLTableCaptionElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ pub struct HTMLTableCellElement {
|
|||
}
|
||||
|
||||
impl HTMLTableCellElement {
|
||||
pub fn new_inherited(type_id: ElementTypeId, tag_name: ~str, document: AbstractDocument) -> HTMLTableCellElement {
|
||||
pub fn new_inherited(type_id: ElementTypeId, tag_name: DOMString, document: AbstractDocument) -> HTMLTableCellElement {
|
||||
HTMLTableCellElement {
|
||||
htmlelement: HTMLElement::new_inherited(type_id, tag_name, document)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLTableColElement {
|
|||
}
|
||||
|
||||
impl HTMLTableColElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTableColElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLTableColElement {
|
||||
HTMLTableColElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLTableColElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLTableColElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLTableColElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::HTMLTableDataCellElementBinding;
|
||||
use dom::bindings::utils::DOMString;
|
||||
use dom::document::AbstractDocument;
|
||||
use dom::element::HTMLTableDataCellElementTypeId;
|
||||
use dom::htmltablecellelement::HTMLTableCellElement;
|
||||
|
@ -13,13 +14,13 @@ pub struct HTMLTableDataCellElement {
|
|||
}
|
||||
|
||||
impl HTMLTableDataCellElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTableDataCellElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLTableDataCellElement {
|
||||
HTMLTableDataCellElement {
|
||||
htmltablecellelement: HTMLTableCellElement::new_inherited(HTMLTableDataCellElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLTableDataCellElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLTableDataCellElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLTableElement {
|
|||
}
|
||||
|
||||
impl HTMLTableElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTableElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLTableElement {
|
||||
HTMLTableElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLTableElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLTableElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLTableElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::HTMLTableHeaderCellElementBinding;
|
||||
use dom::bindings::utils::DOMString;
|
||||
use dom::document::AbstractDocument;
|
||||
use dom::element::HTMLTableHeaderCellElementTypeId;
|
||||
use dom::htmltablecellelement::HTMLTableCellElement;
|
||||
|
@ -13,13 +14,13 @@ pub struct HTMLTableHeaderCellElement {
|
|||
}
|
||||
|
||||
impl HTMLTableHeaderCellElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTableHeaderCellElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLTableHeaderCellElement {
|
||||
HTMLTableHeaderCellElement {
|
||||
htmltablecellelement: HTMLTableCellElement::new_inherited(HTMLTableHeaderCellElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLTableHeaderCellElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLTableHeaderCellElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLTableRowElement {
|
|||
}
|
||||
|
||||
impl HTMLTableRowElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTableRowElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLTableRowElement {
|
||||
HTMLTableRowElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLTableRowElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLTableRowElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLTableRowElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLTableSectionElement {
|
|||
}
|
||||
|
||||
impl HTMLTableSectionElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTableSectionElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLTableSectionElement {
|
||||
HTMLTableSectionElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLTableSectionElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLTableSectionElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLTableSectionElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::HTMLTemplateElementBinding;
|
||||
use dom::bindings::utils::DOMString;
|
||||
use dom::document::AbstractDocument;
|
||||
use dom::element::HTMLTemplateElementTypeId;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
|
@ -13,13 +14,13 @@ pub struct HTMLTemplateElement {
|
|||
}
|
||||
|
||||
impl HTMLTemplateElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTemplateElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLTemplateElement {
|
||||
HTMLTemplateElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLTemplateElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLTemplateElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLTemplateElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLTextAreaElement {
|
|||
}
|
||||
|
||||
impl HTMLTextAreaElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTextAreaElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLTextAreaElement {
|
||||
HTMLTextAreaElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLTextAreaElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLTextAreaElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLTextAreaElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLTimeElement {
|
|||
}
|
||||
|
||||
impl HTMLTimeElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTimeElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLTimeElement {
|
||||
HTMLTimeElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLTimeElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLTimeElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLTimeElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLTitleElement {
|
|||
}
|
||||
|
||||
impl HTMLTitleElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTitleElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLTitleElement {
|
||||
HTMLTitleElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLTitleElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLTitleElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLTitleElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLTrackElement {
|
|||
}
|
||||
|
||||
impl HTMLTrackElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTrackElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLTrackElement {
|
||||
HTMLTrackElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLTrackElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLTrackElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLTrackElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLUListElement {
|
|||
}
|
||||
|
||||
impl HTMLUListElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLUListElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLUListElement {
|
||||
HTMLUListElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLUListElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLUListElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLUListElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::HTMLUnknownElementBinding;
|
||||
use dom::bindings::utils::DOMString;
|
||||
use dom::document::AbstractDocument;
|
||||
use dom::element::HTMLUnknownElementTypeId;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
|
@ -13,13 +14,13 @@ pub struct HTMLUnknownElement {
|
|||
}
|
||||
|
||||
impl HTMLUnknownElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLUnknownElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLUnknownElement {
|
||||
HTMLUnknownElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLUnknownElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLUnknownElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLUnknownElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ pub struct HTMLVideoElement {
|
|||
}
|
||||
|
||||
impl HTMLVideoElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLVideoElement {
|
||||
pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLVideoElement {
|
||||
HTMLVideoElement {
|
||||
htmlmediaelement: HTMLMediaElement::new_inherited(HTMLVideoElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLVideoElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLVideoElementBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -15,13 +15,13 @@ pub struct Text {
|
|||
}
|
||||
|
||||
impl Text {
|
||||
pub fn new_inherited(text: ~str, document: AbstractDocument) -> Text {
|
||||
pub fn new_inherited(text: DOMString, document: AbstractDocument) -> Text {
|
||||
Text {
|
||||
element: CharacterData::new_inherited(TextNodeTypeId, text, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(text: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn new(text: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
let node = Text::new_inherited(text, document);
|
||||
Node::reflect_node(@mut node, document, TextBinding::Wrap)
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::utils::DOMString;
|
||||
use dom::document::AbstractDocument;
|
||||
use dom::element::{HTMLLinkElementTypeId, HTMLIframeElementTypeId, HTMLImageElementTypeId};
|
||||
use dom::htmlelement::HTMLElement;
|
||||
|
@ -159,7 +160,7 @@ fn js_script_listener(to_parent: SharedChan<HtmlDiscoveryMessage>,
|
|||
// Silly macros to handle constructing DOM nodes. This produces bad code and should be optimized
|
||||
// via atomization (issue #85).
|
||||
|
||||
pub fn build_element_from_tag(tag: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
pub fn build_element_from_tag(tag: DOMString, document: AbstractDocument) -> AbstractNode {
|
||||
// TODO (Issue #85): use atoms
|
||||
handle_element!(document, tag, "a", HTMLAnchorElement);
|
||||
handle_element!(document, tag, "applet", HTMLAppletElement);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue