public static PasswordTextBox wrap(Element element) {
        // Assert that the element is attached.
        assert Document.get().getBody().isOrHasChild(element);

        PasswordTextBox textBox = new PasswordTextBox(element);

        // Mark it attached and remember it for cleanup.
        textBox.onAttach();
        RootPanel.detachOnWindowClose(textBox);

        return textBox;
    }
Creates a PasswordTextBox widget that wraps an existing &lt;input
type='password'&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)}.

@param element the element to be wrapped
stroom-core-client-widget/src/main/java/com/google/gwt/user/client/ui/PasswordTextBox.java