mirror of
https://github.com/vlang/v.git
synced 2025-09-11 08:25:42 -04:00
js.dom: add querySelector[All] and NodeList (#20240)
This commit is contained in:
parent
c0321c81a8
commit
ed754cfc31
@ -206,7 +206,7 @@ pub interface JS.Node {
|
|||||||
lookupPrefix(namespace JS.String) JS.String
|
lookupPrefix(namespace JS.String) JS.String
|
||||||
normalize()
|
normalize()
|
||||||
removeChild(child JS.Node) JS.Node
|
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:
|
mut:
|
||||||
nodeValue JS.String
|
nodeValue JS.String
|
||||||
textContent JS.String
|
textContent JS.String
|
||||||
@ -378,6 +378,8 @@ pub interface JS.HTMLElement {
|
|||||||
offsetTop JS.Number
|
offsetTop JS.Number
|
||||||
offsetWidth JS.Number
|
offsetWidth JS.Number
|
||||||
click()
|
click()
|
||||||
|
querySelector(selectors JS.String) ?JS.HTMLElement
|
||||||
|
querySelectorAll(selectors JS.String) JS.NodeList
|
||||||
mut:
|
mut:
|
||||||
accessKey JS.String
|
accessKey JS.String
|
||||||
autocapitalize JS.String
|
autocapitalize JS.String
|
||||||
@ -392,6 +394,14 @@ mut:
|
|||||||
translate JS.Boolean
|
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 fn JS.HTMLElement.prototype.constructor() JS.HTMLElement
|
||||||
|
|
||||||
pub interface JS.HTMLEmbedElement {
|
pub interface JS.HTMLEmbedElement {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user