window.getComputedStyle() returns null inside an iframe with display: none

    xiaoxiao2026-05-09  2

    <script type="text/javascript">   if (/firefox/i.test(navigator.userAgent)){    window.oldGetComputedStyle = window.getComputedStyle;    console.log("a");    window.getComputedStyle = function (element, pseudoElt) {       var t = window.oldGetComputedStyle(element, pseudoElt);         console.log(t);       if (t === null) {          return {             getPropertyValue: function(){}          };       } else{          return t;       }    }; } </script>
    转载请注明原文地址: https://ju.6miu.com/read-1309496.html
    最新回复(0)