This WebKit Library is absolutely fantastic!!! Keep up the good work.
The only little thing which I did notice that I liked about Gecko but Webkit.NET doesn't have, is the Javascript alert,prompt,confirm dialogs and the authentication system.
So like when I go to a password protected site, I get authorization required instead of a password and username prompt.
Is this possible to implement via code in my own project or do I have to modify the actual Wrapper?
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is there any news on this? How do you authenticate using WebKit.NET? Even if I have to modify the wrapper, that is fine, but I just can't find much on this.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Apparently, WebKit.NET guise did not implement methods for displaying message boxes…
To fix this, you would have to rebuild the WebKit.NET project. First, get the WebKit.NET-0.5-src.zip from here, extract it, and open the contained solution in Visual Studio.
Then in Solution Explorer find WebUIDelegate.cs, and locate these 3 methods:
First one gets called when javascript:alert() gets executed in the browser. So, if you modify runJavaScriptAlertPanelWithMessage to look like this (do not put System.Windows.Forms in usages!):
Hello, I know it's late but. Here's for the 'runJavaScriptConfirmPanelWithMessage' method:
1-Add a reference to 'Microsoft.VisualBasic'
2-Include 'using Microsoft.VisualBasic;'
3-Add the following as 'runJavaScriptConfirmPanelWithMessage' method body:
This WebKit Library is absolutely fantastic!!! Keep up the good work.
The only little thing which I did notice that I liked about Gecko but Webkit.NET doesn't have, is the Javascript alert,prompt,confirm dialogs and the authentication system.
So like when I go to a password protected site, I get authorization required instead of a password and username prompt.
Is this possible to implement via code in my own project or do I have to modify the actual Wrapper?
Thanks!
Hi,
I suspect these would need to be added to the wrapper. I'll have a look at GeckoFX and see if I can do the same kind of thing here.
Ok thank-you! I too will do some investigating
Is there any news on this? How do you authenticate using WebKit.NET? Even if I have to modify the wrapper, that is fine, but I just can't find much on this.
Apparently, WebKit.NET guise did not implement methods for displaying message boxes…
To fix this, you would have to rebuild the WebKit.NET project. First, get the WebKit.NET-0.5-src.zip from here, extract it, and open the contained solution in Visual Studio.
Then in Solution Explorer find WebUIDelegate.cs, and locate these 3 methods:
First one gets called when javascript:alert() gets executed in the browser. So, if you modify runJavaScriptAlertPanelWithMessage to look like this (do not put System.Windows.Forms in usages!):
Browser will show a .NET information MessageBox titled "Alert" which holds the given message.
To imeplement confirm(), do this:
You may want to use OK and Cancel buttons…
Prompt is a bit difficult since you must design a form that would allow the user to enter a string… but, this is the way to do it.
Rebuild all, and voila! :D
thanks this really helped me
Hello, I know it's late but. Here's for the 'runJavaScriptConfirmPanelWithMessage' method:
1-Add a reference to 'Microsoft.VisualBasic'
2-Include 'using Microsoft.VisualBasic;'
3-Add the following as 'runJavaScriptConfirmPanelWithMessage' method body:
return Interaction.InputBox(message, "Prompt", defaultText, -1, -1);