@Override public Map getExportedCustomDirectEventTypeConstants () { return MapBuilder.of( NavigationStateChangeEvent.EVENT_NAME, MapBuilder.of("registrationName", "onCrosswalkWebViewNavigationStateChange"), ErrorEvent.EVENT_NAME, MapBuilder.of("registrationName", "onCrosswalkWebViewError"), ProgressEvent.EVENT_NAME, MapBuilder.of("registrationName", "onCrosswalkWebViewProgress"), TopMessageEvent.EVENT_NAME, MapBuilder.of("registrationName", "onMessage") ); }
public void onMessage(String message) { eventDispatcher.dispatchEvent(new TopMessageEvent(this.getId(), message)); }
public void onMessage(String message) { dispatchEvent(this, new TopMessageEvent(this.getId(), message)); }