(params)
| 911 | onProgres() |
| 912 | }, config.longPressEffective) |
| 913 | function onProgres(params) { |
| 914 | state.pressTimer = setTimeout(() => { |
| 915 | if (!isDragging && isMouseDown) { // 确保没有拖拽并且鼠标仍按下 |
| 916 | const link = linkElement.href |
| 917 | state.linkToPreload = link |
| 918 | preloadLink(state.linkToPreload, { importance: 'high' }).then(() => { |
| 919 | openPopupWindow(state.linkToPreload) |
| 920 | }) |
| 921 | } |
| 922 | progressBarremove() |
| 923 | }, config.longPressDuration) |
| 924 | } |
| 925 | } |
| 926 | } |
| 927 | function handleMouseUp() { |
no test coverage detected