svelte-material-ui icon indicating copy to clipboard operation
svelte-material-ui copied to clipboard

Usage of Proxy is problematic when supporting legacy browsers

Open AdamManuel-dev opened this issue 3 years ago • 1 comments

The use of Proxy for the classAdderBuilder function prevents the support of legacy browsers such as IE11 since you can't polyfill proxy as it's implemented on the browser engine level.

function classAdderBuilder(props) {
  return new Proxy(ClassAdder, {
    construct: function construct(target, args) {
      Object.assign(internals, defaults, props); // @ts-ignore: Need spread arg.

      return _construct(target, _toConsumableArray(args));
    },
    get: function get(target, prop) {
      Object.assign(internals, defaults, props);
      return target[prop];
    }
  });
}

Is it possible to replace the Proxy within classAdderBuilder with anything else to allow supporting older browsers when using polyfills/babel without breaking the library?

Thanks!

AdamManuel-dev avatar Dec 15 '21 05:12 AdamManuel-dev

@AdamManuel-dev Are you aware that old IE has been removed in Windows 11? Also, Microsoft is ending support for Windows 10 on October 14th, 2025. BTW: IE itself (and even MS Edge) has been abandoned by Microsoft ...

According statcounter IE has 1.7% desktop browser. If you add mobile, it be less than 1%.

So if you need to support IE 11 (specific embedded solutions) then use an older version of libraries that supported IE.

Otherwise: do not support. If providing support for IE were simple, it would be encouraged. It's such an old engine that there aren't really many things. And the Internet has gone so far that many of them are no longer emulating.

bato3 avatar Dec 18 '21 12:12 bato3