aboutsummaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2014-11-05 14:13:03 +0100
committerMs2ger <ms2ger@gmail.com>2014-11-05 22:08:36 +0100
commit45701002a320601e128ca5e6d4aad0ff60bd1a2e (patch)
treeb9cceddf539bc699d915ed77856415457ab41d0d /components
parentfba6cb9c429d5f27a1f7520bf2c35b58b0a8f250 (diff)
downloadservo-45701002a320601e128ca5e6d4aad0ff60bd1a2e.tar.gz
servo-45701002a320601e128ca5e6d4aad0ff60bd1a2e.zip
Implement HTMLElement.title.
Diffstat (limited to 'components')
-rw-r--r--components/script/dom/htmlelement.rs5
-rw-r--r--components/script/dom/webidls/HTMLElement.webidl2
2 files changed, 6 insertions, 1 deletions
diff --git a/components/script/dom/htmlelement.rs b/components/script/dom/htmlelement.rs
index 189589effd1..43c64599e0a 100644
--- a/components/script/dom/htmlelement.rs
+++ b/components/script/dom/htmlelement.rs
@@ -21,6 +21,8 @@ use dom::virtualmethods::VirtualMethods;
use servo_util::str::DOMString;
+use string_cache::Atom;
+
#[dom_struct]
pub struct HTMLElement {
element: Element
@@ -67,6 +69,9 @@ impl<'a> PrivateHTMLElementHelpers for JSRef<'a, HTMLElement> {
}
impl<'a> HTMLElementMethods for JSRef<'a, HTMLElement> {
+ make_getter!(Title)
+ make_setter!(SetTitle, "title")
+
event_handler!(click, GetOnclick, SetOnclick)
fn GetOnload(self) -> Option<EventHandlerNonNull> {
diff --git a/components/script/dom/webidls/HTMLElement.webidl b/components/script/dom/webidls/HTMLElement.webidl
index ebaa83a19bf..73eb13e3961 100644
--- a/components/script/dom/webidls/HTMLElement.webidl
+++ b/components/script/dom/webidls/HTMLElement.webidl
@@ -6,7 +6,7 @@
// http://www.whatwg.org/html/#htmlelement
interface HTMLElement : Element {
// metadata attributes
- // attribute DOMString title;
+ attribute DOMString title;
// attribute DOMString lang;
// attribute boolean translate;
// attribute DOMString dir;