mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
Allow cross origin arguments and remove apply(..., Array.from)
Fixes #415
This commit is contained in:
parent
8506757c62
commit
4601dd25af
11 changed files with 38 additions and 37 deletions
|
@ -49,13 +49,14 @@
|
|||
};
|
||||
|
||||
scope.exportFunctionWithName = function exportFunctionWithName(func, context, name){
|
||||
const exportedTry = exportFunction(func, context);
|
||||
const exportedTry = exportFunction(func, context, {allowCrossOriginArguments: true});
|
||||
if (exportedTry.name === name){
|
||||
return exportedTry;
|
||||
}
|
||||
else {
|
||||
const wrappedContext = scope.getWrapped(context);
|
||||
const options = {
|
||||
allowCrossOriginArguments: true,
|
||||
defineAs: name
|
||||
};
|
||||
const oldDescriptor = Object.getOwnPropertyDescriptor(wrappedContext, name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue