You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I made a small tweak to cssSandpaper which you might want to integrate. I noticed that it tries to AJAX in stylesheets but most of the time that isn't possible due to same origin policy. Ignoring CORS, I think the best is to just exclude cross domain files.
Of course that poses an issue for files on CDN but I think that should be up to the implementor to figure out. In my case I'm doing everything programatically anyways so maybe I'd even want to disable all the AJAX requests to boost performance but that's a separate issue.
functiongetStyleSheet(node){varsheetCssText;switch(node.nodeName.toLowerCase()){case'style':
sheetCssText=StringHelpers.uncommentHTML(node.innerHTML);//does not work with inline styles because IE doesn't allow you to get the text content of a STYLE elementbreak;case'link':
// Don't fetch stylesheets cross domain since cross domain errors will appearvardomainMatch=/\/\/(.*?)\//.exec(node.href);if(domainMatch!==null&&domainMatch[1]!==location.hostname){return'';}varxhr=XMLHelpers.getXMLHttpRequest(node.href,null,"GET",null,false);sheetCssText=xhr.responseText;break;}sheetCssText=sheetCssText.replace(reMultiLineComment,'').replace(reAtRule,'');returnsheetCssText;}
The text was updated successfully, but these errors were encountered:
I made a small tweak to cssSandpaper which you might want to integrate. I noticed that it tries to AJAX in stylesheets but most of the time that isn't possible due to same origin policy. Ignoring CORS, I think the best is to just exclude cross domain files.
Of course that poses an issue for files on CDN but I think that should be up to the implementor to figure out. In my case I'm doing everything programatically anyways so maybe I'd even want to disable all the AJAX requests to boost performance but that's a separate issue.
The text was updated successfully, but these errors were encountered: