Goktug Gokdogan has posted comments on this change.

Change subject: Adding a DOM clear method to RootPanel
......................................................................


Patch Set 1:

(2 comments)

....................................................
File user/src/com/google/gwt/user/client/ui/RootPanel.java
Line 306: * clear the rootPanel, if eraseDom is true also remove any DOM elements that
Actually, I'm little bit hesitant to add this change.
If the user is manipulating the DOM with elements, it is usually best to leave them the control including cleaning up handlers behind if needed. This API is coming from Panel class and a similar problem exists with any GWT Panel widget. Of course someone can argue that having a convenience method in RootPanel is a special case and will be helpful to developers.

Anyway, if we end up going in this direction, I think it is better to have little bit more explanation:

 Clears the root panel.
<p> By default {@link #clear()} will only remove children that are GWT widgets. This method also provides the option to remove all children including the non-widget DOM elements that are directly added (e.g. elements added via {@code getElement().appendChild(...)}.

@param clearDom if {@code true} this method will also remove any DOM elements that are not widgets.


Line 314: com.google.gwt.user.client.Element containerElement = getElement(); Having Element#removeAllChildren() would be very useful in many cases including this one.


--
To view, visit https://gwt-review.googlesource.com/2512
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I712989276142460b91514713eaf8d8f74dbecd7b
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Daniel Kurka <danku...@google.com>
Gerrit-Reviewer: Goktug Gokdogan <gok...@google.com>
Gerrit-Reviewer: Matthew Dempsky <mdemp...@google.com>
Gerrit-HasComments: Yes

--
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to