aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/attr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/script/dom/attr.rs')
-rw-r--r--src/components/script/dom/attr.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/components/script/dom/attr.rs b/src/components/script/dom/attr.rs
index 045855728b0..3903e2d891d 100644
--- a/src/components/script/dom/attr.rs
+++ b/src/components/script/dom/attr.rs
@@ -65,6 +65,10 @@ impl Attr {
util::swap(&mut self.value, &mut value);
value
}
+
+ pub fn value_ref<'a>(&'a self) -> &'a str {
+ self.value.as_slice()
+ }
}
impl Attr {