MCPcopy
hub / github.com/scrapinghub/splash / expose_html_elements

Method expose_html_elements

splash/qtrender_lua.py:1459–1470  ·  view source on GitHub ↗

Wrap all HTMLElement instances to _ExposedElement

(self, obj)

Source from the content-addressed store, hash-verified

1457 return func
1458
1459 def expose_html_elements(self, obj):
1460 """ Wrap all HTMLElement instances to _ExposedElement """
1461 def _expose(o):
1462 elem = _ExposedElement(self.lua, self.exceptions, self, o)
1463 self._objects_to_clear.add(elem)
1464 return self.element_wrapper._create(elem)
1465
1466 return traverse_data(
1467 obj,
1468 lambda o: isinstance(o, HTMLElement),
1469 convert=_expose,
1470 )
1471
1472 def wait_tick(self, time=0.0):
1473 return _command_result_to_pyresult(self.wait(time))

Callers 7

evaljsMethod · 0.95
selectMethod · 0.95
select_allMethod · 0.95
__call__Method · 0.80
_node_methodMethod · 0.80
_node_propertyMethod · 0.80
_set_node_propertyMethod · 0.80

Calls 1

traverse_dataFunction · 0.90

Tested by

no test coverage detected