1 | /**
|
2 | @license
|
3 | Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
|
4 | This code may only be used under the BSD style license found at
|
5 | http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
|
6 | http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
7 | found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
8 | part of the polymer project is also subject to an additional IP rights grant
|
9 | found at http://polymer.github.io/PATENTS.txt
|
10 | */
|
11 | // Implement Node.baseURI for IE 11
|
12 | // adapted from
|
13 | // https://github.com/webcomponents/html-imports/blob/v1.2.0/src/html-imports.js
|
14 | const native_baseURI = Object.getOwnPropertyDescriptor(Node.prototype, 'baseURI');
|
15 | if (!native_baseURI) {
|
16 | Object.defineProperty(Node.prototype, 'baseURI', {
|
17 | get() {
|
18 | // this.ownerDocument is `null` for documents
|
19 | const doc = this.ownerDocument || this;
|
20 | const base = doc.querySelector('base[href]');
|
21 | return base && base.href || window.location.href;
|
22 | },
|
23 | configurable: true,
|
24 | enumerable: true
|
25 | });
|
26 | }
|
27 | //# sourceMappingURL=baseuri.js.map |
\ | No newline at end of file |