MCPcopy Create free account
hub / github.com/angular-ui/ui-grid / getBaseUrl

Function getBaseUrl

lib/test/angular/1.8.0/angular.js:21891–21906  ·  view source on GitHub ↗

* Returns the current document base URL. * @returns {string}

()

Source from the content-addressed store, hash-verified

21889 * @returns {string}
21890 */
21891function getBaseUrl() {
21892 if (window.document.baseURI) {
21893 return window.document.baseURI;
21894 }
21895
21896 // `document.baseURI` is available everywhere except IE
21897 if (!baseUrlParsingNode) {
21898 baseUrlParsingNode = window.document.createElement('a');
21899 baseUrlParsingNode.href = '.';
21900
21901 // Work-around for IE bug described in Implementation Notes. The fix in `urlResolve()` is not
21902 // suitable here because we need to track changes to the base URL.
21903 baseUrlParsingNode = baseUrlParsingNode.cloneNode(false);
21904 }
21905 return baseUrlParsingNode.href;
21906}
21907
21908/**
21909 * @ngdoc service

Callers 1

urlIsSameOriginAsBaseUrlFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected