feat:use log to hint

This commit is contained in:
pengfei.zhou
2021-03-03 14:43:26 +08:00
committed by osborn
parent 43cec0aee9
commit 3d2722cb3a
3 changed files with 40 additions and 8 deletions

View File

@@ -202,11 +202,25 @@ global.nativeLog = (type, msg) => {
}
};
global.nativeRequire = () => {
console.error("Do not call nativeRequire here");
console.error("nativeRequire", new Error().stack);
console.error("Do not call here in debugging");
return false;
};
global.nativeBridge = () => {
console.error("Do not call nativeBridge here");
console.error("nativeBridge", new Error().stack);
console.error("Do not call here in debugging");
return false;
};
global.Envrionment = new Proxy({}, {
get: (target, p, receiver) => {
console.error("Environment Getter", new Error().stack);
console.error("Do not call here in debugging");
return undefined;
},
set: (target, p, v, receiver) => {
console.error("Environment Setter", new Error().stack);
console.error("Do not call here in debugging");
return Reflect.set(target, p, v, receiver);
}
});
export * from './index';