Add property doc for Polymer.rootPath, move to element-mixim

This commit is contained in:
Kevin Schaaf
2017-03-03 11:34:46 -08:00
parent 139872dce8
commit e27d7294d6
2 changed files with 13 additions and 4 deletions

View File

@@ -788,5 +788,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
}
};
/**
* Globally settable property that is automatically assigned to
* `Polymer.ElementMixin` instances, useful for binding in templates to
* make URL's relative to an application's root. Defaults to the main
* document URL, but can be overridden by users. It may be useful to set
* `Polymer.rootPath` to provide a stable application mount path when
* using client side routing.
*
* @memberof Polymer
*/
Polymer.rootPath = Polymer.rootPath ||
Polymer.ResolveUrl.pathFromUrl(document.baseURI || window.location.href);
})();
</script>

View File

@@ -102,10 +102,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
pathFromUrl: pathFromUrl
};
// NOTE: baseURI is not supported on IE
Polymer.rootPath = Polymer.rootPath ||
pathFromUrl(document.baseURI || window.location.href);
})();
</script>