I've seen a lot of answers to a similar question, but have not found an answer to my question. There is a html page.
<body>
<div id="text">some text</div>
<script>
function hide()
{
document.getElementById("text").style.display = "none";
}
</script>
</body>
The code in gwt
HTMLPane panel = new HTMLPane();
panel.setContentsType(ContentsType.PAGE);
panel.setContentsURL("pages/index.html");
public native void someMethod(HTMLPane panel)/*-{
$doc.hide();
}-*/;
But nothing works. Tried to define the function as
document hide = function hideF()
{
document.getElementById("text").style.display = "none";
}
and define a function in different positions, but nothing helped. Please help find the error, or say that it is impossible