function Htmx::historyElt
Creates a `data-hx-history-elt` attribute.
This attribute instructs HTMX which element to snapshot and restore during history navigation.
Return value
static Returns this object to allow chaining methods. Returns this object to allow chaining methods.
See also
https://htmx.org/attributes/hx-history-elt/
File
-
core/
lib/ Drupal/ Core/ Htmx/ Htmx.php, line 1026
Class
- Htmx
- Presents the HTMX controls for developers to use with render arrays.
Namespace
Drupal\Core\HtmxCode
public function historyElt() : static {
$this->createBooleanAttribute('hx-history-elt', TRUE);
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.