mirror of
https://github.com/Polymer/polymer-starter-kit.git
synced 2025-02-25 18:55:22 -06:00
Merge branch 'polymer-settings' into 3.0-preview
This commit is contained in:
commit
95cc91c473
@ -63,7 +63,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
/**
|
||||
* [polymer-root-path]
|
||||
*
|
||||
* By default, we set `Polymer.rootPath` to the server root path (`/`).
|
||||
* Leave this line unchanged if you intend to serve your app from the root
|
||||
* path (e.g., with URLs like `my.domain/` and `my.domain/view1`).
|
||||
*
|
||||
@ -72,13 +71,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
* to indicate the path from which you'll be serving, including leading
|
||||
* and trailing slashes (e.g., `/my-app/`).
|
||||
*/
|
||||
window.Polymer = { rootPath: '/' };
|
||||
window.MyAppGlobals = { rootPath: '/' };
|
||||
|
||||
// Load and register pre-caching Service Worker
|
||||
if ('serviceWorker' in navigator) {
|
||||
window.addEventListener('load', function() {
|
||||
navigator.serviceWorker.register('service-worker.js', {
|
||||
scope: Polymer.rootPath
|
||||
scope: MyAppGlobals.rootPath
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -27,7 +27,9 @@ import './my-icons.js';
|
||||
// preventable, allowing for better scrolling performance.
|
||||
setPassiveTouchGestures(true);
|
||||
|
||||
setRootPath(Polymer.rootPath);
|
||||
// Set Polymer's root path to the same value we passed to our service worker
|
||||
// in `index.html`.
|
||||
setRootPath(MyAppGlobals.rootPath);
|
||||
|
||||
class MyApp extends PolymerElement {
|
||||
static get template() {
|
||||
|
Loading…
Reference in New Issue
Block a user