mirror of
https://github.com/servo/servo.git
synced 2025-10-16 00:10:23 +01:00
Introduce HTMLIFrameElement::new.
This commit is contained in:
parent
8e5cd9f3a8
commit
7c17970c21
2 changed files with 20 additions and 2 deletions
|
@ -2,10 +2,12 @@
|
|||
* 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::HTMLIFrameElementBinding;
|
||||
use dom::bindings::utils::{DOMString, ErrorResult, null_str_as_empty};
|
||||
use dom::document::AbstractDocument;
|
||||
use dom::element::HTMLIframeElementTypeId;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::{AbstractNode, ScriptView};
|
||||
use dom::node::{AbstractNode, Node, ScriptView};
|
||||
use dom::windowproxy::WindowProxy;
|
||||
use geom::size::Size2D;
|
||||
use geom::rect::Rect;
|
||||
|
@ -58,6 +60,22 @@ impl HTMLIFrameElement {
|
|||
}
|
||||
}
|
||||
|
||||
impl HTMLIFrameElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLIFrameElement {
|
||||
HTMLIFrameElement {
|
||||
htmlelement: HTMLElement::new(HTMLIframeElementTypeId, localName, document),
|
||||
frame: None,
|
||||
size: None,
|
||||
sandbox: None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||
let element = HTMLIFrameElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLIFrameElementBinding::Wrap)
|
||||
}
|
||||
}
|
||||
|
||||
impl HTMLIFrameElement {
|
||||
pub fn Src(&self) -> DOMString {
|
||||
None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue