wangguanquan commented on issue #1954: 
WXSDKInstance类有必要暴露IWXRenderListener和IWXStatisticsListener两个属性
URL: https://github.com/apache/incubator-weex/issues/1954#issuecomment-454721736
 
 
   对线上项目进行修改时比较有用。
   
比如我需要在render错误的时候统一将错误信息提交到服务器,如果没有暴露此监听则需要打开原文件然后在onException的时候添加上报代码,相反则只需要添加一个新的类然后通过`WXSDKInstance.getWXRenderListener`拿到此监听,对此监听做一次包装就可以实现此功能,并且对源代码没有侵入性。
   PS. 虽然也可以通过反射获得,但暴露出来应该不会有危险

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to