web-api-cat 0.6.0

Bindings between boa-cat (JS engine) and the DOM (html-cat tree) plus fetch (net-cat). v0.6.0 bumps to boa-cat 0.7 + ecma-parse-cat 0.3 so the v0.4 `document.cookie` accessor pair and the v0.5 `Value::Promise(_)` arms compose with user-supplied scripts using natural async syntax (`async () => body`, `async function foo() { ... }`, and reserved-word member access like `obj.catch(cb)`). No source change. Seventh sub-crate of a Servo-replacement webview runtime targeting Tauri.
//! Bridge between boa-cat (JS engine) and the DOM + fetch.
//!
//! # Example
//!
//! ```
//! # fn main() -> Result<(), web_api_cat::Error> {
//! use boa_cat::{evaluate_program_with, env::Env, fuel::Fuel, heap::Heap};
//! use ecma_lex_cat::lex;
//! use ecma_parse_cat::parse_script;
//!
//! let html = html_cat::parse("<html><body><p id='g'>hi</p></body></html>")?;
//! let (env, heap) = web_api_cat::install(Env::empty(), Heap::new(), &html);
//! let tokens = lex("document.getElementById('g').textContent")
//!     .map_err(boa_cat::Error::from)?;
//! let program = parse_script(&tokens).map_err(boa_cat::Error::from)?;
//! let (value, _heap) = evaluate_program_with(&program, env, heap, Fuel::new(100_000))?;
//! assert_eq!(format!("{value}"), "\"hi\"");
//! # Ok(())
//! # }
//! ```

#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![allow(clippy::similar_names)]

pub mod cookie;
pub mod document;
pub mod element;
pub mod error;
pub mod extract;
pub mod fetch;
pub mod install;

pub use cookie::{
    get_document_cookie, install_cookie_accessor, read_cookie_writes, set_document_cookie,
};
pub use error::Error;
pub use extract::extract_document;
pub use install::install;