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
Copy file name to clipboardExpand all lines: src/helpers/dom.js
+3-5Lines changed: 3 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -182,24 +182,22 @@ export function awaitElement(elem, func) {
182
182
}
183
183
184
184
/**
185
-
* Watch for an element to appear on the page and then call a function immediately. This is used to prevent the script from running if the element doesn't exist. Improved version of waitForElement.
185
+
* Watch for an element to appear on the page. This is used to prevent the script from running if the element doesn't exist. Improved version of waitForElement.
186
186
* @param {string} e - The element to watch.
187
-
* @param {function} f - The function to call.
187
+
* @returns {Promise<any>} A promise that resolves with the element.
188
188
*/
189
-
exportfunctionwatchForElement(selector,callback){
189
+
exportfunctionwatchForElement(selector){
190
190
returnnewPromise(resolve=>{
191
191
constelement=document.querySelector(selector)
192
192
if(element){
193
193
console.log(`[FastForward] Element found: ${element} | Selector: ${selector}`)
0 commit comments