Best headless browser for AI agents. Lite, Fast, High-Compatibility. Built in Rust
Rust ai-agentsai-toolsbrowserbrowser-automationcloud-browserheadlessheadless-browserkitesurfplaywrightpuppeteerrustservoweb-crawlerweb-crawlingweb-scraperweb-scraping
<!doctype html>
<meta charset="utf-8">
<script src="/wpt/resources/testharness.js"></script>
<script src="/wpt/resources/testharnessreport.js"></script>
<script src="/wpt/resources/moli-wpt-adapter.js"></script>
<script>
const HTML_NS = "http://www.w3.org/1999/xhtml";
const SVG_NS = "http://www.w3.org/2000/svg";
const MATHML_NS = "http://www.w3.org/1998/Math/MathML";
function assert_create_element_namespace(doc, expectedContentType, expectedNamespace, label) {
test(function () {
assert_equals(doc.contentType, expectedContentType, "contentType");
const element = doc.createElement("x");
assert_true(element instanceof Element, "instanceof Element");
assert_equals(element.ownerDocument, doc, "ownerDocument");
assert_equals(element.localName, "x", "localName");
assert_equals(element.prefix, null, "prefix");
assert_equals(element.namespaceURI, expectedNamespace, "namespaceURI");
}, label);
}
assert_create_element_namespace(
document,
"text/html",
HTML_NS,
"createElement() namespace in the current HTML document",
);
assert_create_element_namespace(
document.implementation.createHTMLDocument(""),
"text/html",
HTML_NS,
"createElement() namespace in a created HTML document",
);
assert_create_element_namespace(
document.implementation.createDocument(null, "", null),
"application/xml",
null,
"createElement() namespace in a created XML document",
);
assert_create_element_namespace(
document.implementation.createDocument(HTML_NS, "html", null),
"application/xhtml+xml",
HTML_NS,
"createElement() namespace in a created XHTML document",
);
assert_create_element_namespace(
document.implementation.createDocument(SVG_NS, "svg", null),
"image/svg+xml",
null,
"createElement() namespace in a created SVG document",
);
assert_create_element_namespace(
document.implementation.createDocument(MATHML_NS, "math", null),
"application/xml",
null,
"createElement() namespace in a created MathML document",
);
</script>