@@ -1516,6 +1516,7 @@ type Element interface {
1516
1516
1517
1517
Attributes () map [string ]string
1518
1518
Class () * TokenList
1519
+ Closest (string ) Element
1519
1520
ID () string
1520
1521
SetID (string )
1521
1522
TagName () string
@@ -1527,6 +1528,7 @@ type Element interface {
1527
1528
GetElementsByTagNameNS (ns string , name string ) []Element
1528
1529
HasAttribute (string ) bool
1529
1530
HasAttributeNS (ns string , name string ) bool
1531
+ Matches (string ) bool
1530
1532
QuerySelector (string ) Element
1531
1533
QuerySelectorAll (string ) []Element
1532
1534
RemoveAttribute (string )
@@ -1719,6 +1721,10 @@ func (e *BasicElement) SetClass(s string) {
1719
1721
e .Set ("className" , s )
1720
1722
}
1721
1723
1724
+ func (e * BasicElement ) Closest (s string ) Element {
1725
+ return wrapElement (e .Call ("closest" , s ))
1726
+ }
1727
+
1722
1728
func (e * BasicElement ) ID () string {
1723
1729
return e .Get ("id" ).String ()
1724
1730
}
@@ -1759,6 +1765,10 @@ func (e *BasicElement) HasAttributeNS(ns string, name string) bool {
1759
1765
return e .Call ("hasAttributeNS" , ns , name ).Bool ()
1760
1766
}
1761
1767
1768
+ func (e * BasicElement ) Matches (s string ) bool {
1769
+ return e .Call ("matches" , s ).Bool ()
1770
+ }
1771
+
1762
1772
func (e * BasicElement ) QuerySelector (s string ) Element {
1763
1773
return wrapElement (e .Call ("querySelector" , s ))
1764
1774
}
0 commit comments