aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/settings
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/settings')
-rw-r--r--ext/bg/js/settings/generic-setting-controller.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/ext/bg/js/settings/generic-setting-controller.js b/ext/bg/js/settings/generic-setting-controller.js
index de218816..aa20dbbc 100644
--- a/ext/bg/js/settings/generic-setting-controller.js
+++ b/ext/bg/js/settings/generic-setting-controller.js
@@ -34,7 +34,9 @@ class GenericSettingController {
['setDocumentAttribute', this._setDocumentAttribute.bind(this)],
['setRelativeAttribute', this._setRelativeAttribute.bind(this)],
['splitTags', this._splitTags.bind(this)],
- ['joinTags', this._joinTags.bind(this)]
+ ['joinTags', this._joinTags.bind(this)],
+ ['toNumber', this._toNumber.bind(this)],
+ ['toString', this._toString.bind(this)]
]);
}
@@ -156,4 +158,12 @@ class GenericSettingController {
}
return node;
}
+
+ _toNumber(value, metadata, element) {
+ return DOMDataBinder.convertToNumber(value, element.dataset);
+ }
+
+ _toString(value) {
+ return `${value}`;
+ }
}