diff options
author | Ms2ger <ms2ger@gmail.com> | 2013-11-01 21:47:25 +0100 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2013-11-01 21:47:25 +0100 |
commit | 21be4752a1640dcffa91cab93447b3d9af6ca771 (patch) | |
tree | aa90ea8e9f60c2050d27ba878b8fc09cf2672c39 /src/components/script/dom/htmloptgroupelement.rs | |
parent | bc61e0348ebd44a9ebd20faeae48814f463447d5 (diff) | |
download | servo-21be4752a1640dcffa91cab93447b3d9af6ca771.tar.gz servo-21be4752a1640dcffa91cab93447b3d9af6ca771.zip |
Introduce HTMLOptGroupElement::new.
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..55825725424 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(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 } |