First I have a script file like:
alert('a');
if(***) alter('b');
saved on the server.
I'm using AngularJS developing a mobile app which reads and executes it using eval().
On iOS safari alter('b') will come up first then alter('a') and it seems codes after eval() will run asynchronously.
However on Android & PC Chrome the sequence is as expected as alter('a')->alter('b')->things after eval().
How can I run run scripts synchronously on Safari? Many thanks.
alert('a');
if(***) alter('b');
saved on the server.
I'm using AngularJS developing a mobile app which reads and executes it using eval().
On iOS safari alter('b') will come up first then alter('a') and it seems codes after eval() will run asynchronously.
However on Android & PC Chrome the sequence is as expected as alter('a')->alter('b')->things after eval().
How can I run run scripts synchronously on Safari? Many thanks.
Comment