如何正确删除 gwt 中的元素(`DOM.isOrHasChild` 和 `DOM.removeChild` 均已弃用)?

how to correctly remove element in gwt (both `DOM.isOrHasChild` & `DOM.removeChild` were deprecated)?

好的,这段代码有效

if(DOM.isOrHasChild(RootPanel.getBodyElement(), DOM.getElementById("loading"))){
        DOM.removeChild(RootPanel.getBodyElement(), DOM.getElementById("loading"));
}

但是,DOM.isOrHasChildDOM.removeChild 都已弃用。那么,问题是:

有哪些未弃用的代码可以完成与上述代码相同的任务?也许使用 releaseCapture 或类似的东西?

Document and Element有需要的方法:

Element body = Document.get().getBody();
Element loading = Document.get().getElementById("loading");

if(body.isOrHasChild(loading)){
    loading.removeFromParent();
}