T
T
TechNOIR2018-02-17 17:35:28
C++ / C#
TechNOIR, 2018-02-17 17:35:28

C#. How to intercept link navigation in WebControl (Awesomium)?

Good afternoon.
Can you please tell me how you can intercept the transition by a link in the WebControl element (Awesomium)?
property IsNavigating? (If yes, then please show a simple example of the condition, I can’t find something suitable in any way).
I need to make a simple condition, for example:
By clicking on any link, we intercept the transition. If the link contains any word, then go. If not, then no)
Any ideas, fellow experts?)
For a standard WebBrowser, I use:

void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e)
{
webBrowser1.Navigating += new WebBrowserNavigatingEventHandler(webBrowser1_Navigating);
    string word = "someWord"; //какое-то слово
    if (!e.Url.ToString().Contains(word)) //если не содержит
        e.Cancel = true; //не переходим
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question