I need to remove all the style definitions in a page using javascript, to obtain the same result as doing View > Page Style > No Style in Firefox. Which i
View > Page Style > No Style
Actually, document.querySelectorAll returns NodeList which has forEach method.
document.querySelectorAll
NodeList
document.querySelectorAll('link[rel="stylesheet"], style') .forEach(elem => elem.parentNode.removeChild(elem));