开发者

javascript execution synchronization at UIWebView

开发者 https://www.devze.com 2023-04-11 17:57 出处:网络
I want to change properties (such as -webkit-text-size-adjust:, -webkit-column-gap, -webkit-column-width, etc) of the WebView Page at webViewDidFisnishLoad: deligate, using stringByEvaluatingJavaScrip

I want to change properties (such as -webkit-text-size-adjust:, -webkit-column-gap, -webkit-column-width, etc) of the WebView Page at webViewDidFisnishLoad: deligate, using stringByEvaluatingJavaScriptFromString:, however it works only about half the time. Sometimes I get a white blank screen(?) or size, column change is not done.

I believe that javascript is not executed properly if/when a touch action occurs or other function is executed while being executed.

I'd like to know if there is a way to check to see changes using stringByEvaluatingJavaScriptFromString: is properly done or not开发者_运维问答. Now I am running stringByEvaluatingJavaScriptFromString: by mainthread.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号