Fix settings to pull from Polymer object for defaults.

This commit is contained in:
Kevin Schaaf
2018-11-14 17:08:45 -08:00
parent e8095154f9
commit 77f343697d
+7 -13
View File
@@ -42,10 +42,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
*
* @memberof Polymer
*/
let rootPath = Polymer.rootPath ||
Polymer.ResolveUrl.pathFromUrl(document.baseURI || window.location.href);
Polymer.rootPath = rootPath;
Polymer.rootPath = Polymer.rootPath ||
Polymer.ResolveUrl.pathFromUrl(document.baseURI || window.location.href);;
/**
* Sets the global rootPath property used by `Polymer.ElementMixin` and
@@ -76,10 +74,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
* @type {(function(*,string,string,Node):*)|undefined}
* @memberof Polymer
*/
let sanitizeDOMValue = Polymer.sanitizeDOMValue;
// This is needed for tooling
Polymer.sanitizeDOMValue = sanitizeDOMValue;
Polymer.sanitizeDOMValue = Polymer.sanitizeDOMValue || null;
/**
* Sets the global sanitizeDOMValue available via `Polymer.sanitizeDOMValue`.
@@ -100,9 +95,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
*
* @memberof Polymer
*/
let passiveTouchGestures = false;
Polymer.passiveTouchGestures = passiveTouchGestures;
Polymer.passiveTouchGestures = Polymer.passiveTouchGestures || false;
/**
* Sets `passiveTouchGestures` globally for all elements using Polymer Gestures.
@@ -115,8 +108,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
Polymer.passiveTouchGestures = usePassive;
};
let legacyOptimizations = false;
Polymer.legacyOptimizations = legacyOptimizations;
Polymer.legacyOptimizations = Polymer.legacyOptimizations ||
window.PolymerSettings && PolymerSettings.legacyOptimizations || false;
/**
* Sets `legacyOptimizations` globally for all elements. Enables
* optimizations when only legacy Polymer() style elements are used.