diff --git a/lib/utils/settings.js b/lib/utils/settings.js index 017278ddc5..519ea68313 100644 --- a/lib/utils/settings.js +++ b/lib/utils/settings.js @@ -49,7 +49,7 @@ export const setRootPath = function(path) { * `type` indicates where the value is being inserted: one of property, attribute, or text. * `node` is the node where the value is being inserted. * - * @type {(function(*,string,string,Node):*)|undefined} + * @type {(function(*,string,string,?Node):*)|undefined} */ export let sanitizeDOMValue = window.Polymer && window.Polymer.sanitizeDOMValue || undefined; @@ -57,13 +57,22 @@ export let sanitizeDOMValue = window.Polymer && window.Polymer.sanitizeDOMValue * Sets the global sanitizeDOMValue available via this module's exported * `sanitizeDOMValue` variable. * - * @param {(function(*,string,string,Node):*)|undefined} newSanitizeDOMValue the global sanitizeDOMValue callback + * @param {(function(*,string,string,?Node):*)|undefined} newSanitizeDOMValue the global sanitizeDOMValue callback * @return {void} */ export const setSanitizeDOMValue = function(newSanitizeDOMValue) { sanitizeDOMValue = newSanitizeDOMValue; }; +/** + * Gets sanitizeDOMValue, for environments that don't well support `export let`. + * + * @return {(function(*,string,string,?Node):*)|undefined} sanitizeDOMValue + */ +export const getSanitizeDOMValue = function() { + return sanitizeDOMValue; +}; + /** * Globally settable property to make Polymer Gestures use passive TouchEvent listeners when recognizing gestures. * When set to `true`, gestures made from touch will not be able to prevent scrolling, allowing for smoother diff --git a/test/unit/property-effects.html b/test/unit/property-effects.html index 087023914f..9e2639c932 100644 --- a/test/unit/property-effects.html +++ b/test/unit/property-effects.html @@ -26,7 +26,7 @@