diff --git a/user/src/com/google/gwt/dom/client/Element.java b/user/src/com/google/gwt/dom/client/Element.java index ef8bf34f758..7a6235beca8 100644 --- a/user/src/com/google/gwt/dom/client/Element.java +++ b/user/src/com/google/gwt/dom/client/Element.java @@ -530,6 +530,15 @@ public final boolean hasTagName(String tagName) { return tagName.equalsIgnoreCase(getTagName()); } + /** + * Tests whether the element would be selected by the specified CSS selector. + * @param selectors A string containing valid CSS selectors to test the Element against. + * @return true if the Element matches the selectors. Otherwise, false. + */ + public final native boolean matches(String selectors) /*-{ + return this.matches && this.matches(selectors); + }-*/; + /** * Removes an attribute by name. */