Explorar o código

override getComputedStyle with an empty function

Former-commit-id: d11aab387ddd069353e071bb5b8e5e3c770132cc
Gildas %!s(int64=6) %!d(string=hai) anos
pai
achega
bc691f6fc3
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      cli/back-ends/jsdom.js

+ 1 - 0
cli/back-ends/jsdom.js

@@ -78,6 +78,7 @@ exports.getPageData = async options => {
 			}
 		};
 		win.Element.prototype.getBoundingClientRect = undefined;
+		win.getComputedStyle = () => { };
 		win.eval(scripts);
 		if (win.document.readyState == "loading") {
 			await new Promise(resolve => win.document.onload = resolve);