Is there a way to access the page HTML source code using javascript?
I know that I can use document.body.innerHTML but it contains only the code inside
document.body.innerHTML
Provided that
the page source can be re-downloaded:
fetch(document.location.href) .then(response => response.text()) .then(pageSource => /* ... */)