gwtproject / gwt

GWT Open Source Project
http://www.gwtproject.org
1.52k stars 375 forks source link

Element (API) methods improvement #7999

Open dankurka opened 9 years ago

dankurka commented 9 years ago

Originally reported on Google Code with ID 8002

GWT: 2.5.0.
Please add methods in com.google.gwt.dom.client.ELement to easily find/insert/remove
child's as currently this is poor.

I miss the following (default collection) methods (like they appear in Panel):
- void insertChild(final Element child, final int index);
- boolean removeChild(final int index);
- boolean containsChild(final Element element); 
- int indexOf(final Element element);   
- etc.. (there might be some more).

When using these methods a lot, it really becomes a pain .. ;(
Work around:
I Have helper methods in my own UtilsElement class.

Reported by post2edbras on 2013-02-08 12:56:24

dankurka commented 9 years ago
Do you mind proposing a patch, see: http://www.gwtproject.org/makinggwtbetter.html

Reported by dankurka@google.com on 2013-05-27 19:53:42

dankurka commented 9 years ago
No problem, I just have to find the time and be sure that the patch will be
used?

Reported by post2edbras on 2013-05-27 20:26:39

dankurka commented 9 years ago
To be sure that your patch will make it in, the best way is to start a discussion on
the GWT contributor group (https://groups.google.com/forum/?fromgroups#!forum/Google-Web-Toolkit-Contributors)
and get agreement there and then implement it. Otherwise there might be concerns that
with your patch that others have that are not addressed and will keep it from being
commited.

If you need any help feel free to ping me and I will try to be as helpful as possible.
Thanks!

Reported by dankurka@google.com on 2013-05-27 20:38:02