Browser
Object Hierarchy:
Description:
public class Browser : Box
One WebView browser session (Snappr Browser host port).
Load settle, Soup HEAD probe, freeze overlay, and site cookies follow Snappr. #if ANDROID / WINDOWS / LINUX select
webkitgtk-android / webview2-gtk / WebKitGTK. Dump / fill / press delegate to A11y (Linux
AT-SPI / Windows Win32Atspi / Android Phase 2).
Example
var stack = new OLLMwebkit.BrowserStack();
yield stack.primary.load("https://example.com/");
Content:
Properties:
- public A11y a11y { get; }
Platform accessibility dump / fill / press (Linux AT-SPI / Windows
Win32Atspi).
- public Interface? agent { get; set; }
Set from tool requests so click downloads can ask permission and
notify.
- public Cloudflare cloudflare { get; }
Target-site Cloudflare detection (Phase 4).
- public string current_uri { owned get; }
URI of the WebView (empty string when unset).
- public string pending_load_uri { get; }
URI currently awaited by
load (redirects update this).
- public HashMap<string,string> site_cookies { get; }
Per-host Cookie header map (Snappr site_cookies — shared with
stack).
- public Session soup { get; }
Soup session for the pre-load HEAD reachability probe.
- public BaseTool? tool { get; set; }
Owning tool when this browser is the chat browser host (set from
Request).
- public WebView web_view { get; }
Live WebView for this session (WebKitGTK or WebView2 via ifdef).
Creation methods:
Methods:
- public async void apply_site_cookies (string url)
Inject host cookies harvested earlier this session (Snappr
apply_site_cookies).
- public async void await_load (uint timeout_seconds = 120, string before_uri = "") throws Error
Block until the current WebView load finishes (Snappr await_load).
- public void cancel_load ()
- public async string download (string url) throws Error
Download url into the platform Downloads folder.
- public async string dump (string format) throws Error
Return page content for format (a11y via
A11y).
- public async void fill (HashMap<string,string> fields) throws Error
Apply fill map via A11y
.
- public async void harvest_site_cookies (string uri)
Store Cookie header for uri's host (Snappr
harvest_site_cookies).
- public async void load (string uri, uint timeout_seconds = 120) throws Error
Load uri and block until the main document settles (Snappr
load).
- public void notification_reply (Notification notif)
Banner Cancel for an in-flight download (action cancel).
- public async void press (int id) throws Error
Activate press-ref via
A11y.
Signals:
Inherited Members:
All known members inherited from class Gtk.Box
- append
- baseline_child
- baseline_position
- get_baseline_child
- get_baseline_position
- get_homogeneous
- get_spacing
- homogeneous
- insert_child_after
- prepend
- remove
- reorder_child_after
- set_baseline_child
- set_baseline_position
- set_homogeneous
- set_spacing
- spacing
All known members inherited from class Gtk.Widget
All known members inherited from class GLib.Object
- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer
- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref
All known members inherited from interface Gtk.Accessible
- accessible_role
- announce
- get_accessible_parent
- get_accessible_role
- get_at_context
- get_bounds
- get_first_accessible_child
- get_next_accessible_sibling
- get_platform_state
- reset_property
- reset_relation
- reset_state
- set_accessible_parent
- update_next_accessible_sibling
- update_property
- update_property_value
- update_relation
- update_relation_value
- update_state
- update_state_value
All known members inherited from interface Gtk.Buildable
- add_child
- custom_finished
- custom_tag_end
- custom_tag_start
- get_buildable_id
- get_id
- get_internal_child
- parser_finished
- set_buildable_property
- set_id
All known members inherited from interface Gtk.Orientable