Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Converts most CSS 2.1/3 selectors (see exclusions below) to equivalent XPath 1.0 expression.
See test.js
for examples.
To take advantage of the different capabilities of XPath several custom pseudo selectors have been implemented:
:text
All text matching pseudo classes normalize whitespace and ignore tags.
E.g. " my <i>string</i> "
is treated as "my string"
.
:text("foo")
Case-insensitive matching of element text:text-case("foo")
Case-sensitive :text-case
:text-contains("foo")
Case-insensitive substring matching of element text:text-contains-case("foo")
Case-sensitive :text-contains
:text-start("foo")
Case-insensitive matching of element starting text:text-start-case("foo")
Case-sensitive :text-start
:text-end("foo")
Case-insensitive matching of element ending text:text-end-case("foo")
Case-sensitive :text-end
:comment
:comment
Select comment nodes:comment(n)
Select comment nodes at child position n
Note: Can be combined with :text
to match based on comment text content. E.g. p > :comment:text("foo")
:childless
:childless
As :empty
but ignoring whitespaceThe following may be supported at a later date:
:nth-last-child
Part-dynamic pseudos are excluded as they can only be partially supported by attribute matching:
:checked
:disabled
:enabled
:required
:lang
The following cannot be implemented in XPath 1.0:
:*-of-type
:hover
, :focus
, :active
, :visited
, :target
etc.::before
, ::after
, ::first-letter
etc.FAQs
CSS to XPath
We found that csstoxpath demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.