diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/src/main/java/com/vaadin/client/renderers/TextRenderer.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/client/src/main/java/com/vaadin/client/renderers/TextRenderer.java b/client/src/main/java/com/vaadin/client/renderers/TextRenderer.java index 061a0337da..ad3aefff98 100644 --- a/client/src/main/java/com/vaadin/client/renderers/TextRenderer.java +++ b/client/src/main/java/com/vaadin/client/renderers/TextRenderer.java @@ -15,6 +15,7 @@ */ package com.vaadin.client.renderers; +import com.google.gwt.dom.client.Element; import com.vaadin.client.widget.grid.RendererCellReference; /** @@ -27,6 +28,12 @@ public class TextRenderer implements Renderer<String> { @Override public void render(RendererCellReference cell, String text) { - cell.getElement().setInnerText(text); + // optimization suggested by Oskar Hýbl, Cleverbee solutions + setTextContent(cell.getElement(), text); } + + private native void setTextContent(Element elem, String text) + /*-{ + elem.textContent = text; + }-*/; } |