use of elemental2.dom.NodeList in project kie-wb-common by kiegroup.
the class PrintHelper method changeMediaAttributesToAll.
void changeMediaAttributesToAll(final HTMLDocument printDocument) {
final NodeList<Element> links = printDocument.querySelectorAll("link");
final String attribute = "media";
for (int i = 0; i < links.length; i++) {
final Element link = asElement(links.item(i));
if (Objects.equals(link.getAttribute(attribute), "print")) {
link.setAttribute(attribute, "all");
}
}
}
Aggregations