aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/htmlparamelement.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2013-10-31 21:06:37 +0100
committerMs2ger <ms2ger@gmail.com>2013-10-31 21:06:37 +0100
commit09b840c7ed1afae50409d036a4132232d93aa154 (patch)
tree261cd6fa233f20b1dd5abc940b0705e01772c712 /src/components/script/dom/htmlparamelement.rs
parentec2fd955aa37a381360bd910d401bf4dbbae0c63 (diff)
downloadservo-09b840c7ed1afae50409d036a4132232d93aa154.tar.gz
servo-09b840c7ed1afae50409d036a4132232d93aa154.zip
Introduce HTMLParamElement::new.
Diffstat (limited to 'src/components/script/dom/htmlparamelement.rs')
-rw-r--r--src/components/script/dom/htmlparamelement.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/components/script/dom/htmlparamelement.rs b/src/components/script/dom/htmlparamelement.rs
index c50ca16cb9e..38f48a22c5c 100644
--- a/src/components/script/dom/htmlparamelement.rs
+++ b/src/components/script/dom/htmlparamelement.rs
@@ -2,14 +2,31 @@
* 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::codegen::HTMLParamElementBinding;
use dom::bindings::utils::{DOMString, ErrorResult};
+use dom::document::AbstractDocument;
+use dom::element::HTMLParamElementTypeId;
use dom::htmlelement::HTMLElement;
+use dom::node::{AbstractNode, Node, ScriptView};
pub struct HTMLParamElement {
htmlelement: HTMLElement
}
impl HTMLParamElement {
+ pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLParamElement {
+ HTMLParamElement {
+ htmlelement: HTMLElement::new(HTMLParamElementTypeId, localName, document)
+ }
+ }
+
+ pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
+ let element = HTMLParamElement::new_inherited(localName, document);
+ Node::reflect_node(@mut element, document, HTMLParamElementBinding::Wrap)
+ }
+}
+
+impl HTMLParamElement {
pub fn Name(&self) -> DOMString {
None
}