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

Function _wrap_if_not_none

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

Wrap a `dom_element`, returning `None` if the element is `None`/`null`.

(dom_element)

Source from the content-addressed store, hash-verified

209
210
211def _wrap_if_not_none(dom_element):
212 """
213 Wrap a `dom_element`, returning `None` if the element is `None`/`null`.
214 """
215 return Element.wrap_dom_element(dom_element) if not is_none(dom_element) else None
216
217
218def _find_by_id(dom_node, target_id):

Callers 1

_find_by_idFunction · 0.85

Calls 2

is_noneFunction · 0.90
wrap_dom_elementMethod · 0.80

Tested by

no test coverage detected