aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/attr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/attr.rs')
-rw-r--r--components/script/dom/attr.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/components/script/dom/attr.rs b/components/script/dom/attr.rs
index 55ad525bba3..1820a854cd8 100644
--- a/components/script/dom/attr.rs
+++ b/components/script/dom/attr.rs
@@ -70,6 +70,13 @@ impl AttrValue {
_ => None
}
}
+
+ pub fn atom<'a>(&'a self) -> Option<&'a Atom> {
+ match *self {
+ AttrValue::Atom(ref value) => Some(value),
+ _ => None
+ }
+ }
}
impl Str for AttrValue {