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
|
@ -133,7 +133,7 @@
|
|||
const original = descriptor.value;
|
||||
changeProperty(object, method, "value", function method(){
|
||||
const value = arguments.length?
|
||||
original.apply(this, window.Array.from(arguments)):
|
||||
original.call(this, ...arguments):
|
||||
original.call(this);
|
||||
allCallback();
|
||||
return value;
|
||||
|
@ -272,7 +272,7 @@
|
|||
wrappedWindow,
|
||||
"open", "value", function open(){
|
||||
const newWindow = arguments.length?
|
||||
windowOpen.apply(this, window.Array.from(arguments)):
|
||||
windowOpen.call(this, ...arguments):
|
||||
windowOpen.call(this);
|
||||
if (newWindow){
|
||||
// if we use windowOpen from the normal window we see some SOP errors
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue