taoeffect / vue-script2

Standardized, designer-friendly <script> behavior for your Single Page App
171 stars 15 forks source link

IE Support #21

Closed akhoury closed 6 years ago

akhoury commented 6 years ago

see https://github.com/taoeffect/vue-script2/pull/17

bichikim commented 6 years ago

or you can use this polyfill

(function(arr) {
  arr.forEach(function(item) {
    // eslint-disable-next-line no-prototype-builtins
    if(item.hasOwnProperty('remove')){
      return;
    }
    Object.defineProperty(item, 'remove', {
      configurable: true,
      enumerable: true,
      writable: true,
      value: function remove() {
        this.parentNode.removeChild(this);
      },
    });
  });
})([Element.prototype, CharacterData.prototype, DocumentType.prototype])
taoeffect commented 6 years ago

2.0.2 released, thanks for the pr :)