Hi Everyone,
I'm using the following code. And I'm getting only a fraction of stylesheets from any URL.
JSDOM.fromURL(url, { resources: 'usable' }).then(pagedom => {
var styleSheetsCollection = pagedom.window.document.styleSheets;
console.log(styleSheetsCollection.length);
})
For ex. for
google.com I will get 5 styleSheets when the actual number on the page is 37.
Even if I use setTimeout =30s and check back the result is slightly higher ma. But I don't get all the 37 styleSheets.
Can someone point me on in the right direction here on how I can can get all the stylesheets from the page?
Appreciate the help a lot!
Praneet