Welcome Guest Search | Active Topics | Sign In | Register

Are queuescriptcall and evalscript always executed after JS is executed in the page? Options
zhiouwang
Posted: Sunday, June 27, 2021 1:23:41 PM
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
eo_support
Posted: Sunday, June 27, 2021 3:51:55 PM
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!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.