mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Generate bindings for HTMLHeadElement.
This commit is contained in:
parent
fd4efad70c
commit
9a545b13c3
13 changed files with 132 additions and 73 deletions
|
@ -2,9 +2,10 @@
|
|||
* 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::HTMLElementBinding;
|
||||
use dom::bindings::utils::{DOMString, null_string, ErrorResult};
|
||||
use dom::bindings::utils::{CacheableWrapper, BindingObject, WrapperCache};
|
||||
use dom::element::Element;
|
||||
use dom::element::{Element, ElementTypeId};
|
||||
use dom::node::{AbstractNode, ScriptView};
|
||||
use js::jsapi::{JSObject, JSContext, JSVal};
|
||||
use js::JSVAL_NULL;
|
||||
|
@ -13,6 +14,14 @@ pub struct HTMLElement {
|
|||
parent: Element
|
||||
}
|
||||
|
||||
impl HTMLElement {
|
||||
pub fn new(type_id: ElementTypeId, tag_name: ~str) -> HTMLElement {
|
||||
HTMLElement {
|
||||
parent: Element::new(type_id, tag_name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl HTMLElement {
|
||||
pub fn Title(&self) -> DOMString {
|
||||
null_string
|
||||
|
@ -134,8 +143,9 @@ impl CacheableWrapper for HTMLElement {
|
|||
self.parent.get_wrappercache()
|
||||
}
|
||||
|
||||
fn wrap_object_shared(@mut self, _cx: *JSContext, _scope: *JSObject) -> *JSObject {
|
||||
fail!(~"need to implement wrapping");
|
||||
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
||||
let mut unused = false;
|
||||
HTMLElementBinding::Wrap(cx, scope, self, &mut unused)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue