You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pagespeed.apache.org by GitBox <gi...@apache.org> on 2019/04/21 10:45:47 UTC

[GitHub] [incubator-pagespeed-mod] Lofesa edited a comment on issue #1878: prioritize critial css need to remove id attributes

Lofesa edited a comment on issue #1878: prioritize critial css need to remove id attributes
URL: https://github.com/apache/incubator-pagespeed-mod/issues/1878#issuecomment-485237341
 
 
   Hi
   i donĀ“t know if this is the best way to do, but making these changes in /net/instaweb/rewriter/critical_css_loader.js  deletes the id in styles tags and solve the duplicate id issue.
   
   ` for (var i = 0; i < elements.length; ++i) {
       e = elements[i];
       if (e.nodeName != 'NOSCRIPT') { continue; }
       var div = document.createElement('div');
       div.innerHTML = e.textContent;
       children = div.childNodes;
       for (var v=0; v < children.length; ++v){
       children[v].removeAttribute('id');
   }`
   
   in lines 42-50
   
   ping @oschaaf 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services