diff options
author | Josh Matthews <josh@joshmatthews.net> | 2014-09-19 09:15:03 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2014-09-19 09:15:03 -0400 |
commit | b82c0dced08ccda8c3c7f35643c3891bc45b058c (patch) | |
tree | 4b392e6e26e6d2d4433875cbb51c90237e351f70 /components/script/dom/attr.rs | |
parent | 2652d223f50d53ee5a8a07ff4a3d6a25b510d1f1 (diff) | |
parent | fae7ce3c1dbcbf90460c3fba683c162b6c742cc7 (diff) | |
download | servo-b82c0dced08ccda8c3c7f35643c3891bc45b058c.tar.gz servo-b82c0dced08ccda8c3c7f35643c3891bc45b058c.zip |
Merge pull request #3172 from jdm/devtools
Dump initial prototype of devtools server into the build. Expect lies if...
Diffstat (limited to 'components/script/dom/attr.rs')
-rw-r--r-- | components/script/dom/attr.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/components/script/dom/attr.rs b/components/script/dom/attr.rs index be419eb2a61..61f520821a1 100644 --- a/components/script/dom/attr.rs +++ b/components/script/dom/attr.rs @@ -13,6 +13,8 @@ use dom::element::{Element, AttributeHandlers}; use dom::node::Node; use dom::window::Window; use dom::virtualmethods::vtable_for; + +use devtools_traits::AttrInfo; use servo_util::atom::Atom; use servo_util::namespace; use servo_util::namespace::Namespace; @@ -149,6 +151,7 @@ pub trait AttrHelpers { fn set_value(&self, set_type: AttrSettingType, value: AttrValue); fn value<'a>(&'a self) -> Ref<'a, AttrValue>; fn local_name<'a>(&'a self) -> &'a Atom; + fn summarize(&self) -> AttrInfo; } impl<'a> AttrHelpers for JSRef<'a, Attr> { @@ -184,6 +187,14 @@ impl<'a> AttrHelpers for JSRef<'a, Attr> { fn local_name<'a>(&'a self) -> &'a Atom { &self.local_name } + + fn summarize(&self) -> AttrInfo { + AttrInfo { + namespace: self.namespace.to_str().to_string(), + name: self.Name(), + value: self.Value(), + } + } } pub trait AttrHelpersForLayout { |