Javascript getBody返回null

Javascript getBody返回null,javascript,java,iframe,gwt,ckeditor,Javascript,Java,Iframe,Gwt,Ckeditor,我在GWT项目中使用了CKEditor,我在单个UI中使用了4个CKEditor。更改下拉列表时,am会更改thod CKEditor文本字段的值 IFrameElement iframe = (IFrameElement) element; iframe.getContentDocument().getBody().setInnerText(value); 此处iframe.getContentDocument()返回Document,但iframe.getContentDocument()

我在GWT项目中使用了CKEditor,我在单个UI中使用了4个CKEditor。更改下拉列表时,am会更改thod CKEditor文本字段的值

IFrameElement iframe = (IFrameElement) element;
iframe.getContentDocument().getBody().setInnerText(value);
此处
iframe.getContentDocument()
返回Document,但
iframe.getContentDocument().getBody()
reutrns为空

在前两个ckeditor
iframe.getContentDocument().getBody()
上,它们工作得非常好,但对于下两个,
iframe.getContentDocument().getBody()
reutrns null。由此产生了错误

未捕获的TypeError:无法将属性“textContent”设置为null
在DominmplWebKit_1_g$.setInnerText_2_g$[作为setInnerText_6_g$]…

我希望您在某个地方将值设置为空白(“”),以处理空指针问题。

什么是“元素”以及如何创建它?@RafałSokalski我有自己的javascript代码,返回元素并将其存储到*NodeList@NielsNet我知道如何实施,如果您能给出任何有效的答复,我们将非常感谢您的帮助。是的,谢谢。我现在明白了,我正在调用一个方法,该方法设置了所有textArea的默认值。