comparison 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
comparison
equal deleted inserted replaced
1619:a2cd4222c702 1620:3a60bf3762ef
2 from browser import window 2 from browser import window
3 3
4 4
5 def is_touch_device(): 5 def is_touch_device():
6 return hasattr(window, 'ontouchstart') 6 return hasattr(window, 'ontouchstart')
7
8
9
10 def remove_ids(element):
11 """Recursively remove "id" attribute of element and all its descendants."""
12 element.removeAttribute('id')
13
14 for child in element.children:
15 remove_ids(child)