use of com.gargoylesoftware.htmlunit.html.HtmlMap in project htmlunit by HtmlUnit.
the class HTMLMapElement method getAreas.
/**
* Returns the value of the JavaScript attribute {@code areas}.
* @return the value of this attribute
*/
@JsxGetter
public HTMLCollection getAreas() {
if (areas_ == null) {
final HtmlMap map = (HtmlMap) getDomNodeOrDie();
areas_ = new HTMLCollection(map, false) {
@Override
protected List<DomNode> computeElements() {
final List<DomNode> list = new ArrayList<>();
for (final DomNode node : map.getChildElements()) {
if (node instanceof HtmlArea) {
list.add(node);
}
}
return list;
}
};
}
return areas_;
}
Aggregations