GoogleChrome / dialog-polyfill

Polyfill for the HTML dialog element
BSD 3-Clause "New" or "Revised" License
2.45k stars 245 forks source link

Too long running function #215

Open krom-xr opened 3 years ago

krom-xr commented 3 years ago

https://github.com/GoogleChrome/dialog-polyfill/blob/5033aac1b74c44f36cde47be3d11f4756f3f8fda/dist/dialog-polyfill.js#L487

This function is running too long

var t = new Date()
var x =  !dialogPolyfill.isInlinePositionSetByStylesheet(dialog);
console.log('time - ', new Date() - t);
return x

in my code in firefox i have

time -  816
krom-xr commented 3 years ago
      selectedNodes = document.querySelectorAll(rule.selectorText);

Problem - here.