[][src]Crate localghost

API bindings for Web APIs

Examples

use localghost::prelude::*;
use localghost::{ready, net};

#[localghost::main]
async fn main() {
    ready().await;
    let res = net::Request::new("GET", "https://example.com").send().await;
    println!("responded with {:?}", res.status_code());
}

Re-exports

pub use document::document;
pub use document::Document;

Modules

document

HTML DOM.

events

Event listeners.

log

Structured logging for the browser.

net

Browser networking APIs

prelude

The localghost prelude.

task

Types and Traits for working with asynchronous tasks.

Structs

History

The Web History API.

Window

A reference to the Window object.

Functions

window

Access the browser's Window object.

Attribute Macros

main

Enables an async main function.