IFrame 方法 .getBody returns 空
IFrame method .getBody returns null
我在 GWT 项目中使用 CKEditor,其中我将 4 个 CKEditor 合并为一个 UI。在更改 dropDown 时更改 CKEditor textFields 的值。
IFrameElement iframe = (IFrameElement) element;
iframe.getContentDocument().getBody().setInnerText(value);
这里iframe.getContentDocument()
returns Document , 但是iframe.getContentDocument().getBody()
返回null.
在前两个 ckeditor iframe.getContentDocument().getBody()
中,它们工作得很好,但对于接下来的两个,
iframe.getContentDocument().getBody()
返回 null。因此得到错误
未捕获类型错误:无法设置 属性 'textContent' 为 null
在 DOMImplWebkit_1_g$.setInnerText_2_g$ [作为 setInnerText_6_g$].....
我希望您在某处将值设置为空白 ("") 以处理空指针问题。
我在 GWT 项目中使用 CKEditor,其中我将 4 个 CKEditor 合并为一个 UI。在更改 dropDown 时更改 CKEditor textFields 的值。
IFrameElement iframe = (IFrameElement) element;
iframe.getContentDocument().getBody().setInnerText(value);
这里iframe.getContentDocument()
returns Document , 但是iframe.getContentDocument().getBody()
返回null.
在前两个 ckeditor iframe.getContentDocument().getBody()
中,它们工作得很好,但对于接下来的两个,
iframe.getContentDocument().getBody()
返回 null。因此得到错误
未捕获类型错误:无法设置 属性 'textContent' 为 null 在 DOMImplWebkit_1_g$.setInnerText_2_g$ [作为 setInnerText_6_g$].....
我希望您在某处将值设置为空白 ("") 以处理空指针问题。