title: how to handle iframes/frames dom in the iphone uiwebview
body: <p>in</p>
  
  <p>(void) webViewDidFinishLoad: (UIWebView*)webView</p>
  
  <p>I inject some javascript to handle the iframes. e.g.</p>
  
  <pre><code>    stringByEvaluatingJavaScriptFromString: 
  @"try {
      var document = window.document.getElementsByTagName('iframe')[0].contentWindow.document.getElementsByTagName('frame'); 
      } catch (e) {
      alert (e.message);
      }"
  </code></pre>
  
  <p>It tells me the iframes document is undefined. Actually I have tried to print all the properties of contentWindow of iframe, but it's totally empty.</p>
  
  <p>I know the webViewDidFinishLoad may be called several times for each frame load. But I can never get the iframe document.   I thought there should be at least once all the iframes are ready.</p>
  
  <p>Could someone please tell me how to get the iframe document to process the dom in the uiwebview?</p>
  
  <p>Thanks</p>