/** * Creates an HTML widget that wraps an existing <div> or <span> * element. * * This element must already be attached to the document. If the element is * removed from the document, you must call * {@link RootPanel#detachNow(Widget)}. * * @param element the element to be wrapped */ public static HTML wrap(Element element) { // Assert that the element is attached. assert Document.get().getBody().isOrHasChild(element); HTML html = new HTML(element); // Mark it attached and remember it for cleanup. html.onAttach(); RootPanel.detachOnWindowClose(html); return html; }
public static HTML wrap(Element element) { // Assert that the element is attached. assert Document.get().getBody().isOrHasChild(element); HTML html = new HTML(element); // Mark it attached and remember it for cleanup. html.onAttach(); RootPanel.detachOnWindowClose(html); return html; }
/** * Creates an HTML widget that wraps an existing <div> or <span> * element. * * This element must already be attached to the document. If the element is * removed from the document, you must call * {@link RootPanel#detachNow(Widget)}. * * @param element the element to be wrapped */ public static HTML wrap(Element element) { // Assert that the element is attached. assert Document.get().getBody().isOrHasChild(element); HTML html = new HTML(element); // Mark it attached and remember it for cleanup. html.onAttach(); RootPanel.detachOnWindowClose(html); return html; }
/** * Creates an HTML widget that wraps an existing <div> or <span> * element. * * This element must already be attached to the document. If the element is * removed from the document, you must call * {@link RootPanel#detachNow(Widget)}. * * @param element the element to be wrapped */ public static HTML wrap(Element element) { // Assert that the element is attached. assert Document.get().getBody().isOrHasChild(element); HTML html = new HTML(element); // Mark it attached and remember it for cleanup. html.onAttach(); RootPanel.detachOnWindowClose(html); return html; }