/** * Clear the unhandled event. */ private void clearUnhandledEvent() { if (state != null) { state.getImageElement(this).setPropertyString(UNHANDLED_EVENT_ATTR, ""); } } }
public void execute() { /* * The state has been replaced, or another load event is already * pending. */ if (image.state != State.this || this != syntheticEventCommand) { return; } syntheticEventCommand = null; /* * The image is not attached, so we cannot safely fire the event. We * still want the event to fire eventually, so we mark an unhandled * load event, which will trigger a new synthetic event the next time * the widget is attached. */ if (!image.isAttached()) { getImageElement(image).setPropertyString(UNHANDLED_EVENT_ATTR, BrowserEvents.LOAD); return; } NativeEvent evt = Document.get().createLoadEvent(); getImageElement(image).dispatchEvent(evt); } };
/** * Clear the unhandled event. */ private void clearUnhandledEvent() { if (state != null) { state.getImageElement(this).setPropertyString(UNHANDLED_EVENT_ATTR, ""); } } }
/** * Clear the unhandled event. */ private void clearUnhandledEvent() { if (state != null) { state.getImageElement(this).setPropertyString(UNHANDLED_EVENT_ATTR, ""); } } }
public void execute() { /* * The state has been replaced, or another load event is already * pending. */ if (image.state != State.this || this != syntheticEventCommand) { return; } syntheticEventCommand = null; /* * The image is not attached, so we cannot safely fire the event. We * still want the event to fire eventually, so we mark an unhandled * load event, which will trigger a new synthetic event the next time * the widget is attached. */ if (!image.isAttached()) { getImageElement(image).setPropertyString(UNHANDLED_EVENT_ATTR, BrowserEvents.LOAD); return; } NativeEvent evt = Document.get().createLoadEvent(); getImageElement(image).dispatchEvent(evt); } };
public void execute() { /* * The state has been replaced, or another load event is already * pending. */ if (image.state != State.this || this != syntheticEventCommand) { return; } syntheticEventCommand = null; /* * The image is not attached, so we cannot safely fire the event. We * still want the event to fire eventually, so we mark an unhandled * load event, which will trigger a new synthetic event the next time * the widget is attached. */ if (!image.isAttached()) { getImageElement(image).setPropertyString(UNHANDLED_EVENT_ATTR, BrowserEvents.LOAD); return; } NativeEvent evt = Document.get().createLoadEvent(); getImageElement(image).dispatchEvent(evt); } };