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

Method set_node_style

splash/html_element.py:123–129  ·  view source on GitHub ↗

Set value of the style property of the element

(self, property_name, property_value)

Source from the content-addressed store, hash-verified

121 ))
122
123 def set_node_style(self, property_name, property_value):
124 """ Set value of the style property of the element """
125 return self.tab.evaljs(u"{element}.style[{property}] = {value}".format(
126 element=self.element_js,
127 property=escape_js(property_name),
128 value=escape_js(property_value)
129 ))
130
131 def node_method(self, method_name):
132 """ Return function which calls the specified method of the element """

Callers 1

_set_styleMethod · 0.80

Calls 2

escape_jsFunction · 0.90
evaljsMethod · 0.45

Tested by

no test coverage detected