aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/domstringmap.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/domstringmap.rs')
-rw-r--r--components/script/dom/domstringmap.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/components/script/dom/domstringmap.rs b/components/script/dom/domstringmap.rs
index c5e534d242e..11479d6b5df 100644
--- a/components/script/dom/domstringmap.rs
+++ b/components/script/dom/domstringmap.rs
@@ -47,10 +47,8 @@ impl DOMStringMapMethods for DOMStringMap {
}
// https://html.spec.whatwg.org/multipage/#dom-domstringmap-nameditem
- fn NamedGetter(&self, name: DOMString, found: &mut bool) -> DOMString {
- let attr = self.element.get_custom_attr(name);
- *found = attr.is_some();
- attr.unwrap_or_default()
+ fn NamedGetter(&self, name: DOMString) -> Option<DOMString> {
+ self.element.get_custom_attr(name)
}
// https://html.spec.whatwg.org/multipage/#the-domstringmap-interface:supported-property-names