Rank: Newbie Groups: Member
Joined: 12/11/2019 Posts: 4
|
Are queuescriptcall and evalscript always executed after JS is executed in the page? Is there a way to automatically call and evalscript in queuescriptand then execute JS on the page
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
They will be executed as soon as possible. There is no such thing as "JS is executed in the page". JavaScript execution in the page are triggered by various conditions. For example, your onload handler is only called after your page has finished loading. So QueueScriptCall/EvalScript code can run before that.
If you want code to run before everything else, use WebView.JSInitCode. This code is guaranteed to run before any other JavaScript code in the page.
Thanks!
|