I am trying to prevent a webpage that is not under my control from creating a webgl context. It creates a canvas to do so. I know that disabling hardware acceleration will prevent it, but I do not want to be able to use hardware acceleration for HDR content on YouTube. Is there a way I can disable it on a page using JavaScript? If so, I may be able to create an extension. I have tried injecting an onload event handler using a chrome extension (which did not work). I was attempting to delete a canvas element as soon as it was created.
Is there any way to achieve this using chrome? Is there a way I could do this using an extension? Is it possible to prevent hardware acceleration from being used on a webpage using JavaScript?
If this is not a good question, please let me know and I will either edit it or remove it.
It appears that there is no way to disable hardware acceleration on a tab basis. The javascript route did not prove to be fruitful as it does not appear that you can trick a page into thinking that hardware acceleration is disabled (at least at page load where most pages would check).