用于IE11的ES6代理Polyfill [英] ES6 Proxy Polyfill for IE11

查看:1129
本文介绍了用于IE11的ES6代理Polyfill的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

IE11不会也不会实现ES2015代理对象。然而,IE11延长支持的结束时间是2025年10月14日。

IE11 does not and will not implement ES2015 Proxy objects. Yet IE11's end of extended support is October 14, 2025.

有没有办法为IE11填充代理对象?所有其他浏览器都支持Proxy。

Is there any way to polyfill Proxy objects for IE11? All other browsers support Proxy already.

如果是,那么我们今天都可以在生产中使用它。如果没有那么我们将不得不等待近十年...

If yes then we would all be able to use it in production today. If not then we'll have to wait almost a decade...

编辑:我正在专门针对IE11,因为我知道IE通常具有IE特定功能我经常不知道。

I'm asking specifically for IE11 as I know IE to usually have IE specific features that I'm often not aware of.

Edit2:我特别感兴趣的是能够实现一个全能拦截器。类似于Python中的 __ getattr __ 。它只需要在IE11中工作。

I'm particularly interested in being able to implement a catch-all interceptor. Similar to __getattr__ in Python. It only has to work in IE11.

推荐答案

你能得到的最好是 github:GoogleChrome / proxy-polyfill

根据 Babel docs


由于ES5的限制,代理无法进行转换或填充。

Due to the limitations of ES5, Proxies cannot be transpiled or polyfilled.

这篇关于用于IE11的ES6代理Polyfill的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆