Releases: natemoo-re/ultrahtml
Releases · natemoo-re/ultrahtml
v0.3.2
v0.3.1
v0.3.0
Minor Changes
-
2de70f3: Add
ultrahtml/selector
module which exportsquerySelector
,querySelectorAll
, andmatches
functions.To use
querySelectorAll
, pass the rootNode
as the first argument and any valid CSS selector as the second argument. Note that if a CSS selector you need is not yet implemented, you are invited to open an issue.import { parse } from "ultrahtml"; import { querySelectorAll, matches } from "ultrahtml/selector"; const doc = parse(` <html> <head> <title>Demo</title> /head> <body> <h1>Hello world!</h1> </body> </html> `); const h1 = querySelector(doc, "h1"); const match = matches(h1, "h1");