aboutsummaryrefslogtreecommitdiffstats
path: root/components/util/str.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/util/str.rs')
-rw-r--r--components/util/str.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/components/util/str.rs b/components/util/str.rs
index 80e5fb04d6c..2d6f17ffd19 100644
--- a/components/util/str.rs
+++ b/components/util/str.rs
@@ -24,6 +24,12 @@ impl DOMString {
}
}
+impl Default for DOMString {
+ fn default() -> Self {
+ DOMString(String::new())
+ }
+}
+
impl Deref for DOMString {
type Target = str;