docs.rs failed to build web-api-cat-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
web-api-cat
Bindings between boa-cat (JS engine) and html-cat (DOM) + net-cat (HTTP), exposing document, Element methods, and fetch as boa-cat NativeFns so scripts can read/mutate a parsed HTML document and make synchronous HTTP requests.
web-api-cat is the seventh sub-crate of a comp-cat-rs Servo-replacement webview runtime targeting Tauri integration. Same framework constraints as the rest of the stack: no mut, no Rc/Arc, no interior mutability, no panics.
Example
use ;
use lex;
use parse_script;
use install;
v0 scope
document.getElementById(id)-- walks the document tree, returns the matching element-object ornull.document.querySelector(selector)-- limited subset (tag,.class,#id,tag.class,tag#id).- Element properties:
tagName,id,className,textContent,childrenarray. - Element methods:
getAttribute(name),setAttribute(name, value),hasAttribute(name). fetch(url)-- synchronous net-cat call returning{ ok, status, statusText, text, headers }.
Deferred to v0.2+
- Full CSS selector syntax in
querySelector. - DOM mutation back-propagation to layout-cat / paint-cat.
- Async
fetch(Promise-based). - DOM mutation API (
appendChild,removeChild, ...). - Computed style introspection.
- Event API.
- HTTPS support (waits on net-cat's TLS feature).
License
MIT OR Apache-2.0