|
Rank: Member Groups: Member
Joined: 1/14/2016 Posts: 28
|
can we CRUD cookie by webview or engine (does not through javascript)
|
|
Rank: Member Groups: Member
Joined: 1/14/2016 Posts: 28
|
Code: C#
var jsarr = (m_WebView.EvalScript("a=document.querySelectorAll('.f13>a.c-showurl')") as JSRealObject)?.ToArray();
Console.WriteLine(jsarr);
for (int i = 0; i < jsarr?.Length; i++)
{
var obj = (jsarr[i] as JSObject)["href"];
Console.WriteLine(obj);
obj = (jsarr[i] as JSObject)["innerText"];
Console.WriteLine(obj);
}
must I get href innerText like above, or there are something can be more easy? thank you for your help
|
|
Rank: Member Groups: Member
Joined: 1/14/2016 Posts: 28
|
In the NewWindow event If newWindowEventArgs.Accepted = false; then the new page is not open or open in the background? If newWindowEventArgs.Accepted = true; but I didn't hold WebView show on the UI, then he actually opened page or not or just like a Memory leak?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
If Accepted = false, then the new page will not open.
If Accepted = true, but you did not show the WebView on the UI, the browser engine will wait for you to show it and will eventually hang.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 1/14/2016 Posts: 28
|
eo_support wrote:Hi,
If Accepted = false, then the new page will not open.
If Accepted = true, but you did not show the WebView on the UI, the browser engine will wait for you to show it and will eventually hang.
Thanks! ok, I know it, how about the first two question
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
The first question: No. There are no interface for that.
The second question: You will need to use JavaScript. It will be much more efficient if you move all the code into JavaScript (including the loop) and return a single string from your JavaScript code.
Hope this helps.
Thanks
|
|