mirror of
https://github.com/Polymer/polymer.git
synced 2026-08-19 01:14:44 -05:00
Fix settings to pull from Polymer object for defaults.
This commit is contained in:
+7
-13
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user