aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/testbinding.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/testbinding.rs')
-rw-r--r--components/script/dom/testbinding.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/components/script/dom/testbinding.rs b/components/script/dom/testbinding.rs
index ae63c1f6e20..41a1ff188b2 100644
--- a/components/script/dom/testbinding.rs
+++ b/components/script/dom/testbinding.rs
@@ -27,6 +27,7 @@ use js::jsval::{JSVal, NullValue};
use std::borrow::ToOwned;
use std::ptr;
use std::rc::Rc;
+use util::prefs::{get_pref};
use util::str::DOMString;
#[dom_struct]
@@ -486,6 +487,9 @@ impl TestBindingMethods for TestBinding {
fn PassVariadicUnion6(&self, _: Vec<UnsignedLongOrBoolean>) {}
fn PassVariadicAny(&self, _: *mut JSContext, _: Vec<HandleValue>) {}
fn PassVariadicObject(&self, _: *mut JSContext, _: Vec<*mut JSObject>) {}
+ fn BooleanMozPreference(&self, pref_name: DOMString) -> bool {
+ get_pref(pref_name.as_ref()).as_boolean().unwrap_or(false)
+ }
}
impl TestBinding {