How to select ng-show attributes with specific structure within HTML files with queryselectall?

57 Views Asked by At

this is the html structure

I have attached the picture of the html structure, I would like to pick up with the queryselectall all elements that have ng-show="'EN' == defaultLanguage" that are printable, i.e. have non-hidden content.

var actualLanguage = sessionStorage.getItem("defaultLanguage").toUpperCase().replace(/"/g, '');
                  
var elementsToPrint = document.querySelectorAll('[data-printpdf="true"], [data-isvisible="true"] div:not(.ng-hide) > [data-printgeneratedpdf="true"],[ng-show="true"]');
     

this is the queryselectall that I must also use to get the contents of ng-show in Italian.

0

There are 0 best solutions below