Sign up ×
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them, it only takes a minute:

I have a very intensive JavaScript code that is running in a webview. Is there a way to run this code in a background thread to make the application responsive while this code is running.

I know that manipulating the UI must be made in the main thread but what about JavaScript code in a UIWebView? Thanks in advance :)

Edit: I'm not the one who wrote the JavaScript code. However it search in an HTML book for a text and highlight the text matched

share|improve this question
    
Can you edit the JavaScript or just the Objective-C? – isaach1000 Dec 3 '13 at 18:19
    
Any info on what are trying to do with the intensive javascript – Shiva Dec 3 '13 at 18:34
2  
you can now use Web Workers in mobile safari web apps. – dandavis Dec 3 '13 at 18:40
    
Many Thanks. I have edited the post. I'll see if Web Workers will do the job :) – Hani Ibrahim Dec 3 '13 at 19:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.