@Test public void testFireEvent() throws Exception { mInstance.fireEvent("1","test"); Map<String,Object> params = new HashMap<>(); params.put("arg1",null); params.put("arg2",123); mInstance.fireEvent("1","test",params); Map<String,Object> domChange = new HashMap<>(); domChange.put("attr1","123"); mInstance.fireEvent("1","test",params,domChange); }
public void fireEvent(String elementRef,final String type, final Map<String, Object> data,final Map<String, Object> domChanges){ WXBridgeManager.getInstance().fireEventOnNode(getInstanceId(),elementRef,type,data,domChanges); }
WXSDKInstance implements IWXActivityStateListener,DomContext, View.OnLayoutChangeListener { public void fireEvent(String elementRef,final String type, final Map<String, Object> data,final Map<String, Object> domChanges){ WXBridgeManager.getInstance().fireEventOnNode(getInstanceId(),elementRef,type,data,domChanges); } }
WXSDKInstance implements IWXActivityStateListener,DomContext, View.OnLayoutChangeListener { public void fireEvent(String elementRef,final String type, final Map<String, Object> data,final Map<String, Object> domChanges){ WXBridgeManager.getInstance().fireEventOnNode(getInstanceId(),elementRef,type,data,domChanges); } WXSDKInstance(Context context);   WXSDKInstance(Context context,String id); }
WXSDKInstance implements IWXActivityStateListener,DomContext, View.OnLayoutChangeListener { public void fireEvent(String elementRef,final String type, final Map<String, Object> data,final Map<String, Object> domChanges){ WXBridgeManager.getInstance().fireEventOnNode(getInstanceId(),elementRef,type,data,domChanges); } WXSDKInstance(Context context);   WXSDKInstance(Context context,String id); void setViewPortWidth(int mViewPortWidth); int getViewPortWidth(); void setRenderContainer(RenderContainer a); boolean isTrackComponent(); void setTrackComponent(boolean trackComponent); WXComponent getRootComponent(); void setNestedInstanceInterceptor(NestedInstanceInterceptor interceptor); WXSDKInstance createNestedInstance(NestedContainer container); void addOnInstanceVisibleListener(OnInstanceVisibleListener l); void removeOnInstanceVisibleListener(OnInstanceVisibleListener l); void init(Context context); NativeInvokeHelper getNativeInvokeHelper(); void setBizType(String bizType); ScrollView getScrollView(); void setRootScrollView(ScrollView scrollView); @Deprecated void registerScrollViewListener(WXScrollViewListener scrollViewListener); @Deprecated WXScrollViewListener getScrollViewListener(); @Deprecated void setIWXUserTrackAdapter(IWXUserTrackAdapter adapter); void render(String template, Map<String, Object> options, String jsonInitData); void render(String template, Map<String, Object> options, String jsonInitData, WXRenderStrategy flag); void render(String pageName, String template, Map<String, Object> options, String jsonInitData, WXRenderStrategy flag); @Deprecated void render(String pageName, String template, Map<String, Object> options, String jsonInitData, int width, int height, WXRenderStrategy flag); void render(String template); @Deprecated void render(String template, int width, int height); @Deprecated void renderByUrl(String pageName, final String url, Map<String, Object> options, final String jsonInitData, final int width, final int height, final WXRenderStrategy flag); void renderByUrl(String pageName, final String url, Map<String, Object> options, final String jsonInitData, final WXRenderStrategy flag); void refreshInstance(Map<String, Object> data); void refreshInstance(String jsonData); WXRenderStrategy getRenderStrategy(); @Override Context getUIContext(); String getInstanceId(); Context getContext(); int getWeexHeight(); int getWeexWidth(); IWXImgLoaderAdapter getImgLoaderAdapter(); IDrawableLoader getDrawableLoader(); URIAdapter getURIAdapter(); Uri rewriteUri(Uri uri,String type); IWXHttpAdapter getWXHttpAdapter(); @Nullable IWebSocketAdapter getWXWebSocketAdapter(); @Deprecated void reloadImages(); void registerRenderListener(IWXRenderListener listener); @Deprecated void registerActivityStateListener(IWXActivityStateListener listener); @Override void onActivityCreate(); @Override void onActivityStart(); boolean onCreateOptionsMenu(Menu menu); @Override void onActivityPause(); @Override void onActivityResume(); @Override void onActivityStop(); @Override void onActivityDestroy(); @Override boolean onActivityBack(); boolean onBackPressed(); void onActivityResult(int requestCode, int resultCode, Intent data); void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults); void onViewDisappear(); void onViewAppear(); void onCreateFinish(); void onUpdateFinish(); void runOnUiThread(Runnable action); void onRenderSuccess(final int width, final int height); void onRefreshSuccess(final int width, final int height); void onRenderError(final String errCode, final String msg); void onJSException(final String errCode, final String function, final String exception); @Override final void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int
      oldTop, int oldRight, int oldBottom); void onLayoutChange(View godView); void firstScreenCreateInstanceTime(long time); void callNativeTime(long time); void jsonParseTime(long time); void firstScreenRenderFinished(); void batchTime(long time); void cssLayoutTime(long time); void applyUpdateTime(long time); void updateDomObjTime(long time); void createInstanceFinished(long time); void commitUTStab(final String type, final WXErrorCode errorCode); synchronized void destroy(); boolean isDestroy(); String getBundleUrl(); View getRootView(); View getContainerView(); void setBundleUrl(String url); void onRootCreated(WXComponent root); void addFixedView(View fixedChild); void removeFixedView(View fixedChild); synchronized List<OnWXScrollListener> getWXScrollListeners(); synchronized void registerOnWXScrollListener(OnWXScrollListener wxScrollListener); void setSize(int width, int height); void fireGlobalEventCallback(String eventName, Map<String,Object> params); void fireEvent(String elementRef,final String type, final Map<String, Object> data,final Map<String, Object> domChanges); void fireEvent(String elementRef,final String type, final Map<String, Object> data); void fireEvent(String ref, String type); void fireModuleEvent(String eventName, WXModule module,Map<String, Object> params); boolean checkModuleEventRegistered(String eventName,WXModule module); WXPerformance getWXPerformance(); Map<String, Serializable> getUserTrackParams(); void addUserTrackParameter(String key,Serializable value); void clearUserTrackParameters(); void removeUserTrackParameter(String key); int getMaxDeepLayer(); void setMaxDeepLayer(int maxDeepLayer); }
WXSDKInstance implements IWXActivityStateListener,DomContext, View.OnLayoutChangeListener { public void fireEvent(String elementRef,final String type, final Map<String, Object> data,final Map<String, Object> domChanges){ WXBridgeManager.getInstance().fireEventOnNode(getInstanceId(),elementRef,type,data,domChanges); } WXSDKInstance(Context context);   WXSDKInstance(Context context,String id); void setViewPortWidth(int mViewPortWidth); int getViewPortWidth(); void setRenderContainer(RenderContainer a); boolean isTrackComponent(); void setTrackComponent(boolean trackComponent); WXComponent getRootComponent(); void setNestedInstanceInterceptor(NestedInstanceInterceptor interceptor); WXSDKInstance createNestedInstance(NestedContainer container); void addOnInstanceVisibleListener(OnInstanceVisibleListener l); void removeOnInstanceVisibleListener(OnInstanceVisibleListener l); void init(Context context); NativeInvokeHelper getNativeInvokeHelper(); void setBizType(String bizType); ScrollView getScrollView(); void setRootScrollView(ScrollView scrollView); @Deprecated void registerScrollViewListener(WXScrollViewListener scrollViewListener); @Deprecated WXScrollViewListener getScrollViewListener(); @Deprecated void setIWXUserTrackAdapter(IWXUserTrackAdapter adapter); void render(String template, Map<String, Object> options, String jsonInitData); void render(String template, Map<String, Object> options, String jsonInitData, WXRenderStrategy flag); void render(String pageName, String template, Map<String, Object> options, String jsonInitData, WXRenderStrategy flag); @Deprecated void render(String pageName, String template, Map<String, Object> options, String jsonInitData, int width, int height, WXRenderStrategy flag); void render(String template); @Deprecated void render(String template, int width, int height); @Deprecated void renderByUrl(String pageName, final String url, Map<String, Object> options, final String jsonInitData, final int width, final int height, final WXRenderStrategy flag); void renderByUrl(String pageName, final String url, Map<String, Object> options, final String jsonInitData, final WXRenderStrategy flag); void refreshInstance(Map<String, Object> data); void refreshInstance(String jsonData); WXRenderStrategy getRenderStrategy(); @Override Context getUIContext(); String getInstanceId(); Context getContext(); int getWeexHeight(); int getWeexWidth(); IWXImgLoaderAdapter getImgLoaderAdapter(); IDrawableLoader getDrawableLoader(); URIAdapter getURIAdapter(); Uri rewriteUri(Uri uri,String type); IWXHttpAdapter getWXHttpAdapter(); @Nullable IWebSocketAdapter getWXWebSocketAdapter(); @Deprecated void reloadImages(); void registerRenderListener(IWXRenderListener listener); @Deprecated void registerActivityStateListener(IWXActivityStateListener listener); @Override void onActivityCreate(); @Override void onActivityStart(); boolean onCreateOptionsMenu(Menu menu); @Override void onActivityPause(); @Override void onActivityResume(); @Override void onActivityStop(); @Override void onActivityDestroy(); @Override boolean onActivityBack(); boolean onBackPressed(); void onActivityResult(int requestCode, int resultCode, Intent data); void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults); void onViewDisappear(); void onViewAppear(); void onCreateFinish(); void onUpdateFinish(); void runOnUiThread(Runnable action); void onRenderSuccess(final int width, final int height); void onRefreshSuccess(final int width, final int height); void onRenderError(final String errCode, final String msg); void onJSException(final String errCode, final String function, final String exception); @Override final void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int
      oldTop, int oldRight, int oldBottom); void onLayoutChange(View godView); void firstScreenCreateInstanceTime(long time); void callNativeTime(long time); void jsonParseTime(long time); void firstScreenRenderFinished(); void batchTime(long time); void cssLayoutTime(long time); void applyUpdateTime(long time); void updateDomObjTime(long time); void createInstanceFinished(long time); void commitUTStab(final String type, final WXErrorCode errorCode); synchronized void destroy(); boolean isDestroy(); String getBundleUrl(); View getRootView(); View getContainerView(); void setBundleUrl(String url); void onRootCreated(WXComponent root); void addFixedView(View fixedChild); void removeFixedView(View fixedChild); synchronized List<OnWXScrollListener> getWXScrollListeners(); synchronized void registerOnWXScrollListener(OnWXScrollListener wxScrollListener); void setSize(int width, int height); void fireGlobalEventCallback(String eventName, Map<String,Object> params); void fireEvent(String elementRef,final String type, final Map<String, Object> data,final Map<String, Object> domChanges); void fireEvent(String elementRef,final String type, final Map<String, Object> data); void fireEvent(String ref, String type); void fireModuleEvent(String eventName, WXModule module,Map<String, Object> params); boolean checkModuleEventRegistered(String eventName,WXModule module); WXPerformance getWXPerformance(); Map<String, Serializable> getUserTrackParams(); void addUserTrackParameter(String key,Serializable value); void clearUserTrackParameters(); void removeUserTrackParameter(String key); int getMaxDeepLayer(); void setMaxDeepLayer(int maxDeepLayer); public boolean mEnd; static final String BUNDLE_URL; }