Triggering shouldStartLoadWithRequest with multiple window.location.href calls

Posted by AlBeebe on Stack Overflow See other posts from Stack Overflow or by AlBeebe
Published on 2010-05-29T11:23:08Z Indexed on 2010/05/29 11:32 UTC
Read the original article Hit count: 412

Filed under:
|
|

Im trying to pass multiple things from a webpage inside a UIWebView back to my iPhone app via the shouldStartLoadWithRequest method of the UIWebView.

Basically my webpage calls window.location.href = "command://foo=bar" and i am able to intercept that in my app no problem. Now if i create a loop and do multiple window.location.href calls at once, then shouldStartLoadWithRequest only appears to get called on once and the call it gets is the very last firing of window.location.href at the end of the loop.

The same thing happens with the webview for Android, only the last window.location.href gets processed.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about uiwebview