This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function eleCanScroll(ele) { | |
if (!ele instanceof HTMLElement) { | |
console.log("fuck off"); | |
return; | |
} | |
if (ele.scrollTop > 0) { | |
return true; | |
} else { | |
ele.scrollTop++; | |
// 元素不能滚动的话,scrollTop 设置不会生效,还会置为 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git bisect start // 开始二分法查找 | |
git bisect reset // 退出二分查找 | |
git bisect good [good_commit] // 已知的最后一次正常状态 | |
git bisect bad // 表示当前是有问题的 | |
之后 git 就会自动切换到 [good_commit] 和 HEAD 中间的那次 commit, | |
我们再根据代码当前的状态标记 git bisect bad|good,往复几次之后,就能找到引起问题的提交 |