Edit this page

up.element up.element.all([parent], selector)
JavaScript function

This feature has been deprecated. Use Document#querySelectorAll() or Element#querySelectorAll() instead

Load unpoly-migrate.js to polyfill deprecated features.

Returns all descendant elements matching the given selector.


Parameters

[parent=document] Element optional

The parent element whose descendants to search.

If omitted, all elements in the document will be searched.

selector string

The CSS selector to match.

Return value

A list of all elements matching the selector.

Returns an empty list if there are no matches.