mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Introduce HTMLFormElement::new.
This commit is contained in:
parent
996f2dcbb9
commit
b923bcdef7
2 changed files with 18 additions and 2 deletions
|
@ -2,15 +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::HTMLFormElementBinding;
|
||||
use dom::bindings::utils::{DOMString, ErrorResult};
|
||||
use dom::document::AbstractDocument;
|
||||
use dom::element::HTMLFormElementTypeId;
|
||||
use dom::htmlcollection::HTMLCollection;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::{AbstractNode, ScriptView};
|
||||
use dom::node::{AbstractNode, Node, ScriptView};
|
||||
|
||||
pub struct HTMLFormElement {
|
||||
htmlelement: HTMLElement
|
||||
}
|
||||
|
||||
impl HTMLFormElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLFormElement {
|
||||
HTMLFormElement {
|
||||
htmlelement: HTMLElement::new(HTMLFormElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||
let element = HTMLFormElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLFormElementBinding::Wrap)
|
||||
}
|
||||
}
|
||||
|
||||
impl HTMLFormElement {
|
||||
pub fn AcceptCharset(&self) -> DOMString {
|
||||
None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue