Skip to content

Commit

Permalink
improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislav-atr committed Oct 7, 2022
1 parent 19b4903 commit bb06036
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/scriptlets/trusted-click-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ export function trustedClickElement(source, selectors, delay, extraMatch = '') {
/**
* Create selectors array and swap selectors to null on finding corresponding element
*
* Selectors stubs should not be removed from array to keep track of elements order
* and to always know on what index corresponding element should be put
*
* null values allow to keep the sequence in order
* and prevent selectors from being queried multiple times
*/
Expand All @@ -127,6 +130,9 @@ export function trustedClickElement(source, selectors, delay, extraMatch = '') {
/**
* Array of element structures to keep found elements until they are eligible
* to being clicked by delay and/or click order and allow skipping clicked elements
*
* Elements stubs should not be removed from array to keep track
* of their order and clicked 'state'
*/
const elementStruct = {
element: undefined,
Expand Down

0 comments on commit bb06036

Please sign in to comment.