GWTコードを含むiframeがあります。そのコードからiframeのサイズを動的に変更したいと思います。
私は次のことを試みています:
Element iframe = we start from some element inside the iframe;
while (!iframe.getTagName().toLowerCase().equals("iframe")) { // get embedding iframe
iframe = iframe.getParentElement();
}
iframe.setAttribute("style", "height:100px;width:100px;");
動作しません。途中のどこかで、iframeに到達する前にnullの親に到達します。
iframe自体の中で実行されるGWTからiframeのサイズを変更するにはどうすればよいですか?それがJSNIベースのソリューションであるかどうかは気にしません。
ありがとう!