Changelog
0.3.2
Changelog
0.3.0
2de70f3: Add ultrahtml/selector
module which exports querySelector
, querySelectorAll
, and matches
functions.
To use querySelectorAll
, pass the root Node
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");
Changelog
0.1.3
Changelog
0.1.0
Changelog
0.0.5
walk
function definition