I'm building an addon that works on a page where the canvas
element prototype has been modified, this means any new canvas
element I create on the page or in the addon with have the same modified state.
Is there a way to get around this? I tried using eval()
but it also uses the page "version" of the HTMLCanvasElement
.
To get around it in the browser manually I can create an iframe
and execute a script inside it that sets a variable on the parent window which I can then of course .call()
with the context I want, the problem is that WebExtensions doesn't allow access to variables set by page scripts.