Common patterns for working with the WEB API.
queste sono le versioni di questo script in cui il codice è stato aggiornato Visualizza tutte le versioni.
Factor roCallback() out of otrot2().
This is to be consistent with otmot() and otrot().
While in here, also added an initial call to the monitoring function and a logging statement, again, simply for consistency.
Issue #221.
␄
Bump version number.
Invoke the otmot() monitor function once at the start.
Not unlike the "one last try" a few lines above, there might be situations where the criteria has already been met, but no mutations have been observered and no time out.
Issue #218.
JSDoc: Fix typo in comment.
Factor roCallback() out of otrot().
This is to be consistent with otmot().
While in here, also added an initial and final calls to the monitoring function. Previously the final call was explicitly avoided in otrot(), but upon reflection, seems to cause no harm. Similarly, the initial call was just added to otmot() and seems reasonable here.
Factor moCallback() out of otrot().
The function was getting a bit long, so pulled out the MutationObserver callback.
Also fixed a minor cosmetic issue where, during the "one last try" run of the callback, a "rejecting after timeout" message would still be logged.
Promote SPA.dumpInfoAboutElement() to lib/web.js.
SPA.dumpInfoAboutElement()
Issue #205.
Give the monitor function one last try in otmot().
We already do similar in otrot2(), and the change there just makes the coding look similar.
We also make use of this pattern in a recent change to Scroller.
Scroller
Sometimes otmot() monitor functions do not inspect the records, but instead it is easier to just poll a global state to see if it valid. In those cases, the observeOptions may not be precise enough, and an important mutation missed. This change gives everything a chance to resolve successfully.
A similar change was NOT made to otrot() because the options are set in the function and anything missed is a bug in the library.
Issue #150.
Bump version numbers.
Migrate a number of functions to lib/web.
These include clickElement(), focusOnElement(), and isInput().
I have no idea how I missed these when I added the otmot family.
Issue #167.