JSFiddle - React, Tailwind, and code Playground
JavaScript
// 挑战目标:检测 Math 是否被代理
if (Math.random() < 0.5) {
console.log('hooked');
self.Math = new Proxy(Math, {
get(obj, prop) {
return obj[prop];
}
});
}
// 你的代码写在此处:
// ...
// 挑战目标:检测 Math 是否被代理
if (Math.random() < 0.5) {
console.log('hooked');
self.Math = new Proxy(Math, {
get(obj, prop) {
return obj[prop];
}
});
}
// 你的代码写在此处:
// ...