Mercurial > libervia-web
diff libervia/web/pages/_browser/tools.py @ 1620:3a60bf3762ef
browser: threads and replies implementation:
rel 457
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 06 May 2025 00:40:07 +0200 |
parents | 4ab4bc3ae462 |
children |
line wrap: on
line diff
--- a/libervia/web/pages/_browser/tools.py Sat Apr 12 00:21:45 2025 +0200 +++ b/libervia/web/pages/_browser/tools.py Tue May 06 00:40:07 2025 +0200 @@ -4,3 +4,12 @@ def is_touch_device(): return hasattr(window, 'ontouchstart') + + + +def remove_ids(element): + """Recursively remove "id" attribute of element and all its descendants.""" + element.removeAttribute('id') + + for child in element.children: + remove_ids(child)