ServoDelegate

Trait ServoDelegate 

Source
pub trait ServoDelegate {
    // Provided methods
    fn notify_error(&self, _error: ServoError) { ... }
    fn notify_devtools_server_started(&self, _port: u16, _token: String) { ... }
    fn request_devtools_connection(&self, _request: AllowOrDenyRequest) { ... }
    fn load_web_resource(&self, _load: WebResourceLoad) { ... }
    fn show_notification(&self, _notification: Notification) { ... }
}

Provided Methods§

Source

fn notify_error(&self, _error: ServoError)

Notification that Servo has received a major error.

Source

fn notify_devtools_server_started(&self, _port: u16, _token: String)

Report that the DevTools server has started on the given port. The token that be used to bypass the permission prompt from the DevTools client.

Source

fn request_devtools_connection(&self, _request: AllowOrDenyRequest)

Request a DevTools connection from a DevTools client. Typically an embedder application will show a permissions prompt when this happens to confirm a connection is allowed.

Source

fn load_web_resource(&self, _load: WebResourceLoad)

Triggered when Servo will load a web (HTTP/HTTPS) resource. The load may be intercepted and alternate contents can be loaded by the client by calling WebResourceLoad::intercept. If not handled, the load will continue as normal.

Note: This delegate method is called for all resource loads not associated with a [WebView]. For loads associated with a [WebView], Servo will call crate::WebViewDelegate::load_web_resource.

Source

fn show_notification(&self, _notification: Notification)

Request to display a notification.

Implementors§