Skip to content

Commit 2955860

Browse files
committed
Add Element.matches which has all modern browser support
1 parent b1222bf commit 2955860

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/scala/org/scalajs/dom/raw/lib.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -817,6 +817,13 @@ abstract class Element
817817
*/
818818
def insertAdjacentHTML(where: String, html: String): Unit = js.native
819819

820+
/**
821+
* Supported by FF>34, Opera>21, Chrome>34, IE>9, Safari>4
822+
*
823+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/matches
824+
*/
825+
def matches(selector: String): Boolean = js.native
826+
820827
/**
821828
* getAttribute() returns the value of the named attribute on the specified element.
822829
* If the named attribute does not exist, the value returned will either be null or ""

0 commit comments

Comments
 (0)