title: How to adjust height of richtextbox dynamically based on inner content?
body: <pre><code>public class AutoResizeBox extends RichTextArea
  {
      public AutoResizeBox()
      {
         set(getElement());
      }
  
     public static native void set(Element f) /*-{
         console.log(f.tagName) ;
           // console.log(f.document.body.scrollHeight + 'px');
     }-*/;
  }
  </code></pre>
  
  <hr>
  
  <p>RichTextBox is based on iframe,I tried to use JSNI.For above code,"console.log(f.tagName)" will print out "IFRAME",but "console.log(f.document.body.scrollHeight + 'px');" will preduce a compilation error:"
  com.google.gwt.core.client.JavaScriptException: (TypeError): f.document is undefined",　can anybody  tell me reasons?</p>