108

为原生API添加功能 | 百度EUX

 6 years ago
source link: http://eux.baidu.com/blog/2017/06/%E4%B8%BA%E5%8E%9F%E7%94%9Fapi%E6%B7%BB%E5%8A%A0%E5%8A%9F%E8%83%BD
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
为原生API添加功能,即继承原生API并进行扩展 这篇文章来源于一个需求:如何统计ajax请求从发起到成功返回所耗费的时间? 如果在业务中每个请求的发起和结束时进行打点,计算差值的话,那么工作量将非常巨大,如果要求每个项目封装一个通用方法的话,对于我们这种有好几百个项目的部门来说也同样是不可能的,那么就需要对XMLH

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK