How to get readyState from GWT Frame object?
I'm using GWT 2.3.0 in my project and I have an iframe and a loading mask. When the iframe content (to be more specific, the content is a PDF) is loaded I need to hide the loading mask.
I tried using:
Frame frame = new Frame("https://www.example.com.br/example开发者_运维问答.pdf") {{
addDomHandler(new LoadHandler() {
public void onLoad(LoadEvent event) {
loadingMask.setVisible(false);
}
}, LoadEvent.getType());
}};
Because of the content is a PDF, it does not work in IE.
Is there a way to get the readyState iframe property with GWT?
I would appreciate any feedback. Thanks for all.
to get the readyState GWT Frame property:
frame.getElement().getAttribute("readyState")
Just override the onLoad()
method on Frame
:
Frame frame = new Frame("https://www.example.com.br/example.pdf") {
@Override
protected void onLoad() {
super.onLoad();
loadingMask.setVisible(false);
}
};
精彩评论