(updatedTabId, changeInfo)
| 52 | resolve(); |
| 53 | }; |
| 54 | const onUpdated = (updatedTabId, changeInfo) => { |
| 55 | if (updatedTabId === tabId && changeInfo.status === "complete") { |
| 56 | finish(); |
| 57 | } |
| 58 | }; |
| 59 | const timer = setTimeout(finish, timeoutMs); |
| 60 | |
| 61 | chrome.tabs.onUpdated.addListener(onUpdated); |