@pyscript/core 0.5.2-rc2 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,22 +0,0 @@
1
- from pyscript import document
2
- from pyscript.web.elements import Element, ElementCollection
3
-
4
-
5
- class DOM:
6
- def __init__(self):
7
- self.body = Element.from_dom_element(document.body)
8
- self.head = Element.from_dom_element(document.head)
9
-
10
- def __getitem__(self, selector):
11
- return self.find(selector)
12
-
13
- def find(self, selector):
14
- return ElementCollection(
15
- [
16
- Element.from_dom_element(dom_element)
17
- for dom_element in document.querySelectorAll(selector)
18
- ]
19
- )
20
-
21
-
22
- dom = DOM()