mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
Always specify correct function names
This commit is contained in:
parent
29e61ada25
commit
e2efb727b9
3 changed files with 52 additions and 35 deletions
|
@ -131,13 +131,15 @@
|
|||
protectionDefinition.methods.forEach(function(method){
|
||||
const descriptor = Object.getOwnPropertyDescriptor(object, method);
|
||||
const original = descriptor.value;
|
||||
changeProperty(object, method, "value", function method(){
|
||||
const value = arguments.length?
|
||||
original.call(this, ...arguments):
|
||||
original.call(this);
|
||||
allCallback();
|
||||
return value;
|
||||
});
|
||||
changeProperty(object, method, "value", class {
|
||||
[method](){
|
||||
const value = arguments.length?
|
||||
original.call(this, ...arguments):
|
||||
original.call(this);
|
||||
allCallback();
|
||||
return value;
|
||||
}
|
||||
}.prototype[method]);
|
||||
});
|
||||
protectionDefinition.getters.forEach(function(property){
|
||||
const temp = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue