ElemeFE / obsolete-webpack-plugin

🌈 A Webpack plugin generates a browser-side standalone script that detects browser compatibility based on `Browserslist` and prompts website users to upgrade it.
MIT License
184 stars 14 forks source link

Cannot work below ie10 #4

Closed zhaosiwen1949 closed 5 years ago

zhaosiwen1949 commented 5 years ago

Environment

IE 10, IE 9 and below

Current Behavior

Cannot work, and console the error ---- "Object does not support the "getElementById" property or method"

Expected Behavior

Can work

Detailed Description

I find this

 bindEvents(fragment) {
    const close = fragment.getElementById('obsoleteClose');

    if (!close) {
      return;
    }

In line 49, alert.js But fragment.getElementById can't work under IE 10, https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment Can it be replaced by fragment.querySelector, thank u~~~

chikara-chan commented 5 years ago

Fixed in v0.5.4.