function Htmx::morphSkipChildren
Creates a `data-hx-morph-skip-children` attribute.
The hx-morph-skip-children attribute updates an element’s attributes during a morph swap but leaves its children alone.
As this attribute always marks a single element, modifiers are not applicable.
Parameters
bool $toggle: Whether to toggle the attribute on or off. Defaults to TRUE.
Return value
static Returns this object to allow chaining methods.
See also
https://four.htmx.org/reference/attributes/hx-morph-skip-children/
File
-
core/
lib/ Drupal/ Core/ Htmx/ Htmx.php, line 1271
Class
- Htmx
- Presents the HTMX controls for developers to use with render arrays.
Namespace
Drupal\Core\HtmxCode
public function morphSkipChildren(bool $toggle = TRUE) : static {
$this->createBooleanAttribute('hx-morph-skip-children', $toggle, self::NO_MODIFIER);
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.