MCPcopy Create free account
hub / github.com/gawel/pyquery / xpath_reset_pseudo

Method xpath_reset_pseudo

pyquery/cssselectpatch.py:313–324  ·  view source on GitHub ↗

Matches all reset input elements:: >>> from pyquery import PyQuery >>> d = PyQuery(' ') >>> d('input:reset') [ ] ..

(self, xpath)

Source from the content-addressed store, hash-verified

311 return xpath
312
313 def xpath_reset_pseudo(self, xpath):
314 """Matches all reset input elements::
315
316 >>> from pyquery import PyQuery
317 >>> d = PyQuery('<div><input type="reset"/></div>')
318 >>> d('input:reset')
319 [<input>]
320
321 ..
322 """
323 xpath.add_condition("@type = 'reset' and name(.) = 'input'")
324 return xpath
325
326 def xpath_header_pseudo(self, xpath):
327 """Matches all header elements (h1, ..., h6)::

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected