diff --git a/vlib/js/dom/dom.js.v b/vlib/js/dom/dom.js.v index 7d2c5bc988..877d4cff2a 100644 --- a/vlib/js/dom/dom.js.v +++ b/vlib/js/dom/dom.js.v @@ -206,7 +206,7 @@ pub interface JS.Node { lookupPrefix(namespace JS.String) JS.String normalize() removeChild(child JS.Node) JS.Node - replaceChild(node JS.Node, child JS.Node) JS.Npde + replaceChild(node JS.Node, child JS.Node) JS.Node mut: nodeValue JS.String textContent JS.String @@ -378,6 +378,8 @@ pub interface JS.HTMLElement { offsetTop JS.Number offsetWidth JS.Number click() + querySelector(selectors JS.String) ?JS.HTMLElement + querySelectorAll(selectors JS.String) JS.NodeList mut: accessKey JS.String autocapitalize JS.String @@ -392,6 +394,14 @@ mut: translate JS.Boolean } +pub type NodeListForEachCb = fn (JS.HTMLElement, JS.Number, JS.NodeList) + +pub interface JS.NodeList { + length JS.Number + forEach(cb NodeListForEachCb, thisArg JS.Any) + item(idx JS.Number) ?JS.Any +} + pub fn JS.HTMLElement.prototype.constructor() JS.HTMLElement pub interface JS.HTMLEmbedElement {