has-descendant-after.js 341 B

123456789101112131415
  1. function pageHasElmAfter(results) {
  2. const elmUsedAnywhere = results.some(
  3. frameResult => frameResult.result === true
  4. );
  5. // If the element exists in any frame, set them all to true
  6. if (elmUsedAnywhere) {
  7. results.forEach(result => {
  8. result.result = true;
  9. });
  10. }
  11. return results;
  12. }
  13. export default pageHasElmAfter;