diff options
author | bors-servo <release+servo@mozilla.com> | 2013-11-05 07:17:27 -0800 |
---|---|---|
committer | bors-servo <release+servo@mozilla.com> | 2013-11-05 07:17:27 -0800 |
commit | e16a29480ef48aad6db08710954a2a4ba6802e0d (patch) | |
tree | b9804e71caf250194d2e5c2ab1849cc96c6f0f50 /src/components/script/dom/htmloptgroupelement.rs | |
parent | 47f3880c4d48638b757256570a123d23efe230c4 (diff) | |
parent | 655a2099ef1adf6b8712557331ef649d990b0541 (diff) | |
download | servo-e16a29480ef48aad6db08710954a2a4ba6802e0d.tar.gz servo-e16a29480ef48aad6db08710954a2a4ba6802e0d.zip |
auto merge of #1177 : Ms2ger/servo/new-htmlelement, r=jdm
r? @jdm
Diffstat (limited to 'src/components/script/dom/htmloptgroupelement.rs')
-rw-r--r-- | src/components/script/dom/htmloptgroupelement.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/components/script/dom/htmloptgroupelement.rs b/src/components/script/dom/htmloptgroupelement.rs index 640907d7501..0bd13fbd6e3 100644 --- a/src/components/script/dom/htmloptgroupelement.rs +++ b/src/components/script/dom/htmloptgroupelement.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::HTMLOptGroupElementBinding; use dom::bindings::utils::{DOMString, ErrorResult}; +use dom::document::AbstractDocument; +use dom::element::HTMLOptGroupElementTypeId; use dom::htmlelement::HTMLElement; +use dom::node::{AbstractNode, Node, ScriptView}; pub struct HTMLOptGroupElement { htmlelement: HTMLElement } impl HTMLOptGroupElement { + pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLOptGroupElement { + HTMLOptGroupElement { + htmlelement: HTMLElement::new_inherited(HTMLOptGroupElementTypeId, localName, document) + } + } + + pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> { + let element = HTMLOptGroupElement::new_inherited(localName, document); + Node::reflect_node(@mut element, document, HTMLOptGroupElementBinding::Wrap) + } +} + +impl HTMLOptGroupElement { pub fn Disabled(&self) -> bool { false } |