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

Method find

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

Find all descendant elements matching the [CSS `selector`](https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Selectors). Returns an `ElementCollection` (possibly empty). ```python element.find("div") # All div descendants. element

(self, selector)

Source from the content-addressed store, hash-verified

676 return clone
677
678 def find(self, selector):
679 """
680 Find all descendant elements matching the
681 [CSS `selector`](https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Selectors).
682
683 Returns an `ElementCollection` (possibly empty).
684
685 ```python
686 element.find("div") # All div descendants.
687 element.find(".my-class") # All elements with class.
688 element.find("#my-id") # Element with id (as collection).
689 element.find("div.my-class") # All divs with class.
690 ```
691 """
692 return _find_and_wrap(self._dom_element, selector)
693
694 def show_me(self):
695 """

Callers

nothing calls this directly

Calls 1

_find_and_wrapFunction · 0.85

Tested by

no test coverage detected