Sign in

    mizchi/crater-browser/shell does not have a README file

    Browser

    type Browser

    Browser state

    Browser::activate_at

    async fn Browser::activate_at(self : Browser, col : Int, row : Int) -> Bool raise
    HttpError

    async fn Browser::activate_focused_link(self : Browser) -> Bool raise
    HttpError

    async fn Browser::activate_link_at(self : Browser, col : Int, row : Int) -> Bool raise
    HttpError

    Browser::cookie_jar

    Backward-compatible accessor for the per-session cookie jar. Prefer this method over reaching into Profile internals.

    Browser::debug_layout

    fn Browser::debug_layout(self : Browser) -> Unit

    Debug: print layout tree

    Browser::enter_hint_mode

    fn Browser::enter_hint_mode(self : Browser) -> Unit

    Enter hint mode - generate hints for visible links only

    Browser::execute_inline_js_async

    async fn Browser::execute_inline_js_async(self : Browser, source : String) -> String? raise
    HttpError

    Browser::execute_scripts

    fn Browser::execute_scripts(self : Browser) -> Int

    Execute scripts from the page (inline only, sync version) Requires enable_js to be set to true (use --enable-js flag)

    Browser::exit_hint_mode

    fn Browser::exit_hint_mode(self : Browser) -> Unit

    Exit hint mode

    Browser::get_current_url

    fn Browser::get_current_url(self : Browser) -> String

    Browser::get_dom_tree

    Get current URL
    fn Browser::get_focused_link_index(self : Browser) -> Int

    Get currently focused link index
    fn Browser::get_focused_link_url(self : Browser) -> String?

    Get currently focused link URL

    Browser::get_last_navigation_url

    fn Browser::get_last_navigation_url(self : Browser) -> String?

    fn Browser::get_link_at(self : Browser, col : Int, row : Int) -> String?

    Find link URL at screen coordinates (for mouse click) Returns the resolved absolute URL if a link is found
    fn Browser::get_link_count(self : Browser) -> Int

    Get number of extracted links

    Browser::get_viewport_height

    fn Browser::get_viewport_height(self : Browser) -> Int

    Get viewport height in pixels

    Browser::go_back

    async fn Browser::go_back(self : Browser) -> String? raise
    HttpError

    Go back to previous page in history and load it

    Browser::go_forward

    async fn Browser::go_forward(self : Browser) -> String? raise
    HttpError

    Go forward to next page in history and load it

    Browser::handle_focused_key

    async fn Browser::handle_focused_key(self : Browser, key : String) -> Bool raise
    HttpError

    Browser::hover_at

    fn Browser::hover_at(self : Browser, col : Int, row : Int) -> Bool

    Browser::http_cache

    Backward-compatible accessor for the per-session HTTP cache. Prefer this method over reaching into Profile internals.

    Browser::is_hint_mode

    fn Browser::is_hint_mode(self : Browser) -> Bool

    Whether hint mode is active

    Browser::navigate

    async fn Browser::navigate(self : Browser, url : String) -> String raise
    HttpError

    Navigate to a URL and render (adds to back history, clears forward history)

    Browser::navigate_lightweight

    async fn Browser::navigate_lightweight(self : Browser, url : String) -> String raise
    HttpError

    Navigate to URL in lightweight mode (for --json, --aom modes) Skips CSS cascade and layout calculation to reduce memory usage

    Browser::new

    fn Browser::new(width : Int, height : Int, terminal_cols? : Int) -> Browser

    Create a new browser instance
    fn Browser::next_link(self : Browser) -> Unit

    Focus next visible focusable element (Tab)

    Browser::pointer_down_at

    fn Browser::pointer_down_at(self : Browser, col : Int, row : Int) -> Bool

    Browser::pointer_move_at

    fn Browser::pointer_move_at(self : Browser, col : Int, row : Int) -> Bool

    Browser::pointer_up_at

    async fn Browser::pointer_up_at(self : Browser, col : Int, row : Int) -> Bool raise
    HttpError

    fn Browser::prev_link(self : Browser) -> Unit

    Focus previous visible focusable element (Shift+Tab)

    Browser::process_hint_char

    fn Browser::process_hint_char(self : Browser, char : String) -> String?

    Process hint character input Returns Some(url) if a hint is matched, None otherwise

    Browser::render_output

    fn Browser::render_output(self : Browser, mode : OutputMode) -> String

    Render current content in selected output mode

    Browser::render_text_full_page

    fn Browser::render_text_full_page(self : Browser) -> String

    Browser::scroll_down

    fn Browser::scroll_down(self : Browser, amount : Int) -> Unit

    Scroll down

    Browser::scroll_up

    fn Browser::scroll_up(self : Browser, amount : Int) -> Unit

    Scroll up

    Browser::set_dark_mode

    fn Browser::set_dark_mode(self : Browser, enabled : Bool) -> Unit

    Set dark mode explicitly

    Browser::set_enable_cookies

    fn Browser::set_enable_cookies(self : Browser, enable : Bool) -> Unit

    Enable or disable cookie jar. Swaps only the jar on the existing profile, preserving http_cache, user_agent, and auth_state.

    Browser::set_enable_js

    fn Browser::set_enable_js(self : Browser, enable : Bool) -> Unit

    Enable or disable JavaScript execution JavaScript is disabled by default for security reasons. Use --enable-js flag to enable it.

    Browser::set_html_content

    fn Browser::set_html_content(self : Browser, html : String) -> Unit

    Set HTML content directly (for testing or headless rendering).

    Browser::set_image_cache_max_bytes

    fn Browser::set_image_cache_max_bytes(self : Browser, max_bytes : Int) -> Unit

    Browser::set_js_runtime

    fn Browser::set_js_runtime(self : Browser, runtime : &
    JsRuntime
    ) -> Unit

    Set a custom JS runtime for script execution (e.g. V8 for native). Must be called before any script execution (before navigate/load_html).

    Browser::set_no_color

    fn Browser::set_no_color(self : Browser, enabled : Bool) -> Unit

    Set no-color mode (disable ANSI color codes)

    Browser::set_request_sandbox

    fn Browser::set_request_sandbox(self : Browser, sandbox :
    RequestSandbox
    ) -> Unit

    Configure request sandbox policy

    Browser::tick_js

    fn Browser::tick_js(self : Browser) -> Bool

    Browser::toggle_dark_mode

    fn Browser::toggle_dark_mode(self : Browser) -> Unit

    Toggle dark mode

    Browser::toggle_selection_mode

    fn Browser::toggle_selection_mode(self : Browser) -> Bool

    Toggle selection mode (for text copy with mouse) Returns true if selection mode is now enabled, false if disabled

    Browser::write_output

    async fn[T :
    Writer
    ] Browser::write_output(self : Browser, mode : OutputMode, writer : T) -> Unit

    OutputMode

    pub(all) enum OutputMode {
    Sixel
    Kitty
    Text
    Json
    Aom
    Arc90
    ExtractMain
    Grounding
    }

    Browser output mode

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io