Let the embedder decide if servo should follow a link or not

This commit is contained in:
Paul Rouget 2017-03-02 09:33:19 +01:00
parent d0856fd4cd
commit 79a5bf0cbf
6 changed files with 27 additions and 0 deletions

View file

@ -134,6 +134,8 @@ pub trait WindowMethods {
fn load_end(&self, back: bool, forward: bool, root: bool);
/// Called when the browser encounters an error while loading a URL
fn load_error(&self, code: NetError, url: String);
/// Wether or not to follow a link
fn allow_navigation(&self, url: ServoUrl) -> bool;
/// Called when the <head> tag has finished parsing
fn head_parsed(&self);