MCPcopy Index your code
hub / github.com/pyscript/pyscript / update_all

Method update_all

core/src/stdlib/pyscript/web.py:1164–1176  ·  view source on GitHub ↗

Explicitly update all elements with the given `classes`, `style`, and `attributes`. Delegates to each element's `update` method. ```python collection.update_all(innerHTML="Hello") collection.update_all(classes="active", style={"color": "red"}) collec

(self, classes=None, style=None, **kwargs)

Source from the content-addressed store, hash-verified

1162 return ElementCollection(elements)
1163
1164 def update_all(self, classes=None, style=None, **kwargs):
1165 """
1166 Explicitly update all elements with the given `classes`, `style`, and
1167 `attributes`. Delegates to each element's `update` method.
1168
1169 ```python
1170 collection.update_all(innerHTML="Hello")
1171 collection.update_all(classes="active", style={"color": "red"})
1172 collection.update_all(className="active", title="Updated")
1173 ```
1174 """
1175 for element in self._elements:
1176 element.update(classes=classes, style=style, **kwargs)
1177
1178
1179# Special elements with custom methods and mixins.

Calls 1

updateMethod · 0.45