Files
DefinitelyTyped/dom4/dom4-tests.ts
2016-05-10 16:27:59 -07:00

15 lines
429 B
TypeScript

function testDocument() {
document.query(".container-a").classList;
document.queryAll(".container-b")[0].className;
document.queryAll(".container-c").childElementCount;
}
function testElement(el: Element) {
let isInDocument: boolean = el.closest("document") != null;
let isButton: boolean = el.matches("button");
el.firstElementChild.getAttribute("foo");
el.lastElementChild.getAttribute("bar");
}