You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 24, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 24, 2022. It is now read-only.
Activity
hax commentedon Jul 8, 2015
isWebkit和isMoz是基于vendor prefix检测,很不靠谱(浏览器随时可能去掉)。
如果要保持这个用法——其目的是检测vendor前缀用于css之类的,那么:
_.ua.vendor.webkitvendor.ms和vendor.o。(2个是因为有非webkit浏览器支持webkit前缀)cssmagic commentedon Jul 8, 2015
理论上是这样。但浏览器出于向后兼容的目的,不会轻易这样做。
而且除此以外我没找到更可靠的办法。
没有考虑这个目的。而且记得似乎 Zepto 内部已经做了类似的工作,我回头再查证一下。
hax commentedon Jul 8, 2015
我觉得还是要分析用途。判定isWebkit是用来干嘛的呢?
cssmagic commentedon Jul 9, 2015
在内部,以前是用来为 WebKit 的特殊行为写兼容的,比如页面滚动条的
scrollTop是在body上而不是在html上的,除此以外的其它地方很少用到。而且由于 jQuery 和 Zepto 已经对这个问题做了处理,所以后来基本不用了。业务场景下应该几乎用不到。那不如我把这两个内核探测接口删掉吧。
hax commentedon Jul 9, 2015
嗯。那就删了吧。