I created a widget that displays svg images. Including a browser fork to display a png alternatively.
In case of loading the png I am using Image class and refire its loading event.
The svg-xml String is fetched from server via RequestBuilder (see here). Now I want to fire a new LoadEvent onResponseReceived and an ErrorEvent onError.
But how to create a LoadEvent (Javadoc says I should create one from a NativeEvent but this doesn’t have a constructor either).
The only way I see at the moment is to create my own LoadEvent, but this shouldn’t be necessary, should it?
Replacing
sourcewith your widget.The same with
Document.get().createErrorEvent()for the error event.