From: Matti Tahvonen Date: Fri, 11 Jul 2008 06:41:28 +0000 (+0000) Subject: added helper method to clone dom element X-Git-Tag: 6.7.0.beta1~4444 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=aa8fd16a1e6ecbc4ee7fbc8e218f8908e94cffb4;p=vaadin-framework.git added helper method to clone dom element svn changeset:5083/svn branch:trunk --- diff --git a/src/com/itmill/toolkit/terminal/gwt/client/Util.java b/src/com/itmill/toolkit/terminal/gwt/client/Util.java index 3058a68302..5ecc407e66 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/Util.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/Util.java @@ -146,4 +146,19 @@ public class Util { el.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"', sizingMethod='crop');"; },false); }-*/; + + /** + * Clones given element as in JavaScript. + * + * Deprecate this if there appears similar method into GWT someday. + * + * @param element + * @param deep + * clone child tree also + * @return + */ + public static native Element cloneNode(Element element, boolean deep) + /*-{ + return element.cloneNode(deep); + }-*/; }