Search in sources :

Example 36 with NodeList

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");
        }
    }
}
Also used : Element(elemental2.dom.Element) HTMLElement(elemental2.dom.HTMLElement)

Aggregations

Element (elemental2.dom.Element)36 HTMLElement (elemental2.dom.HTMLElement)33 Test (org.junit.Test)24 HTMLDivElement (elemental2.dom.HTMLDivElement)18 HTMLButtonElement (elemental2.dom.HTMLButtonElement)16 DOMTokenList (elemental2.dom.DOMTokenList)15 DataType (org.kie.workbench.common.dmn.client.editors.types.common.DataType)9 HTMLInputElement (elemental2.dom.HTMLInputElement)8 HTMLAnchorElement (elemental2.dom.HTMLAnchorElement)7 NodeList (elemental2.dom.NodeList)4 Factory.createGripElement (org.kie.workbench.common.dmn.client.editors.types.listview.draganddrop.DNDListDOMHelper.Factory.createGripElement)4 DNDListDOMHelper.isDraggingElement (org.kie.workbench.common.dmn.client.editors.types.listview.draganddrop.DNDListDOMHelper.isDraggingElement)4 HTMLDocument (elemental2.dom.HTMLDocument)3 HTMLBodyElement (elemental2.dom.HTMLBodyElement)2 Node (elemental2.dom.Node)2 CSSStyleDeclaration (elemental2.dom.CSSStyleDeclaration)1 Window (elemental2.dom.Window)1 ArrayList (java.util.ArrayList)1 DataTypeConstraint (org.kie.workbench.common.dmn.client.editors.types.listview.constraint.DataTypeConstraint)1