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');
   }-*/;
}
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?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to