code: public static <T> ValueBox<T> wrap(final Element element, final Renderer<T> renderer,
        final Parser<T> parser) {
      // Assert that the element is attached.
      assert Document.get().getBody().isOrHasChild(element);
  
      final ValueBox<T> valueBox = new ValueBox<>(element, renderer, parser);
  
      // Mark it attached and remember it for cleanup.
      valueBox.onAttach();
      RootPanel.detachOnWindowClose(valueBox);
  
      return valueBox;
    }
docs: Creates a ValueBox widget that wraps an existing &lt;input type='text'&gt; element.
  
  <p>
  This element must already be attached to the document. If the element is removed from the
  document, you must call {@link RootPanel#detachNow(Widget)}.
  </p>
  
  @param <T> the value type
  
  @param element the element to be wrapped
  @param renderer rendering routine
  @param parser parsing routine
  @return value box