mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
Add property doc for Polymer.rootPath, move to element-mixim
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user