当前位置:网站首页>Incomplete Polyfill of proxy
Incomplete Polyfill of proxy
2020-11-09 23:48:00 【Ah ho boy】
https://github.com/GoogleChrome/proxy-polyfill
Only listen for existing attributes
The polyfill supports just a limited number of proxy 'traps'. It also works by calling seal on the object passed to
Proxy
. This means that the properties you want to proxy must be known at creation time.
const proxyPolyfill = require('proxy-polyfill/src/proxy')();
// Your environment may also support transparent rewriting of commonJS to ES6:
// import ProxyPolyfillBuilder from 'proxy-polyfill/src/proxy';
// const proxyPolyfill = ProxyPolyfillBuilder();
const target = {
message1: "hello",
message2: "everyone"
};
const handler2 = {
get: function(target, prop, receiver) {
return "world";
}
};
console.log(proxyPolyfill)
const proxy2 = new proxyPolyfill(target, handler2);
console.log(proxy2.message1,proxy2.message)
// [Function: ProxyPolyfill] { revocable: [Function (anonymous)] }
// world undefined
版权声明
本文为[Ah ho boy]所创,转载请带上原文链接,感谢
边栏推荐
- So what should investors do with the current market? Now a new investment outlet is coming!
- 商品后台系统实现
- Prometheus installation configuration
- eleven point nine
- Application of V7 version of lvgl Library
- Python中[:]与[::]的用法
- C/C++编程笔记:C语言开发坦克大战!纪念我们逝去的小霸王游戏
- Common concepts and points for attention of CUDA
- 利用尾巴作为时间序列进行处理来识别鲸鱼
- CUDA_ Global memory and access optimization
猜你喜欢
代码中的软件工程--对menu项目的源码分析
Win7 + vs2015 + cuda10.2 configuration tensorrt7.0
白山云科技入选2020中国互联网企业百强
树莓派鼓捣记 - 设置 wifi
2020-11-09:谈谈布隆过滤器和布谷鸟过滤器的相同点和不同点?
爱康国宾怒斥国信证券报告失实,已发律师函
SQL case conversion, remove the space before and after
Can't find other people's problem to solve
SQL intercepts the data before and after the '.'
C + + game development
随机推荐
IP地址SSL证书
LeetCode-378. 有序矩阵中第K小的元素
C++异常实现机制
proxy 的不完整polyfill
手把手教你使用容器服务 TKE 集群审计排查问题
代码中的软件工程--对menu项目的源码分析
剑指offer之打印超过数组一半的数字
win7+vs2015+cuda10.2配置TensorRT7.0
2020-11-09:谈谈布隆过滤器和布谷鸟过滤器的相同点和不同点?
快来学习!个性化推荐系统开发指南(附网盘链接)
Application of V7 version of lvgl Library
毕业即失业?大学生如何分配学习时间比例,拥有完整计算机知识体系?
函数计算进阶-IP查询工具开发
Prometheus安装配置
2018中国云厂商TOP5:阿里云、腾讯云、AWS、电信、联通 ...
会展云技术解读 | 面对突发事故,APP 如何做好崩溃分析与性能监控?
异常:Invalid or unexpected token
Brief analysis of LinkedList source code
What is the SRM system? SRM supplier management system functions
input 与 button 的问题 (空隙/不等高/对不齐)及 解决办法