Your target selectors may use this pseudo-class to replace an element with an descendant matching the given selector.
up.render('div:has(span)', { url: '...' })
replaces the first <div>
elements with at least one <span>
among its descendants:
<div>
<span>Will be replaced</span>
</div>
<div>
Will NOT be replaced
</div>
As a level 4 CSS selector,
:has()
is currrently implemented in many modern browsers.
Unpoly polyfills :has()
so you can use it in target selectors in all supported browsers.