Skip to content
This repository was archived by the owner on Jun 12, 2019. It is now read-only.

[proposal] add baseURI polyfill #2

Closed
valdrinkoshi opened this issue Jan 10, 2017 · 0 comments
Closed

[proposal] add baseURI polyfill #2

valdrinkoshi opened this issue Jan 10, 2017 · 0 comments

Comments

@valdrinkoshi
Copy link
Contributor

valdrinkoshi commented Jan 10, 2017

Would this be the right place where to add the polyfill for baseURI ?

if ('baseURI' in Node.prototype === false) {
  Object.defineProperty(Node.prototype, 'baseURI', {
    get: function() {
      var base = (this.ownerDocument || this).querySelector('base');
      return (base || window.location).href;
    },
    configurable: true,
    enumerable: true
  });
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@dfreedm @valdrinkoshi and others