You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

UploadIFrameOnloadStrategyIE.java 651B

1234567891011121314151617181920212223242526
  1. package com.vaadin.terminal.gwt.client.ui;
  2. import com.google.gwt.dom.client.Element;
  3. /**
  4. * IE does not have onload, detect onload via readystatechange
  5. *
  6. */
  7. public class UploadIFrameOnloadStrategyIE extends UploadIFrameOnloadStrategy {
  8. @Override
  9. native void hookEvents(Element iframe, VUpload upload)
  10. /*-{
  11. iframe.onreadystatechange = function() {
  12. if (iframe.readyState == 'complete') {
  13. upload.@com.vaadin.terminal.gwt.client.ui.VUpload::onSubmitComplete()();
  14. }
  15. };
  16. }-*/;
  17. @Override
  18. native void unHookEvents(Element iframe)
  19. /*-{
  20. iframe.onreadystatechange = null;
  21. }-*/;
  22. }