I would like to clear the entire head section after loading the page ... in fact, my goal would be to remove all the JavaScript code contained in the head section.
Is there a way to do something like this:
document.head.innerHTML = "";
Explanation: I am using a Python script that uses Qt and webkit to take screenshots of websites.
It works on most styles, but there is one that it can't handle. There is a ton of JavaScript code on this site that works on timeouts. The WebKit webpage object allows you to execute JavaScript on the page. If there is some way that JavaScript removes the entire form of code in the section of the chapter, I would like to try this for testing to see if it allows my screenshot of the script.
javascript html
benino
source share