New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More →

wait-for-the-element

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wait-for-the-element - npm Package Compare versions

Comparing version

to
4.0.2

@@ -5,4 +5,8 @@ # Changelog

## [4.0.1] (2021-10-27)
## 4.0.2 - 2024-05-26
The package repository has moved and it's now reflected in the package metadata; this version contains no functionality changes.
## 4.0.1 - 2021-10-27
### Changed

@@ -12,3 +16,3 @@

## [4.0.0] (2021-07-22)
## 4.0.0 - 2021-07-22

@@ -20,4 +24,9 @@ ### Changed

## [3.0.0] (2021-07-01)
## 3.0.0 - 2021-07-01
### Added
- Introduced `waitForTheElementToDisappear()` that will wait for all elements to stop matching a provided selector.
- Introduced an ESM version of this module that will be used when being imported using `import`.
### Changed

@@ -30,7 +39,2 @@

### Added
- Introduced `waitForTheElementToDisappear()` that will wait for all elements to stop matching a provided selector.
- Introduced an ESM version of this module that will be used when being imported using `import`.
### Removed

@@ -40,3 +44,3 @@

## [2.2.0] (2019-06-04)
## 2.2.0 - 2019-06-04

@@ -47,3 +51,3 @@ ### Added

## [2.1.0] (2018-12-05)
## 2.1.0 - 2018-12-05

@@ -58,4 +62,8 @@ ### Added

## [2.0.0] (2018-09-25)
## 2.0.0 - 2018-09-25
### Added
- Introduced the `tryAndWaitForTheElement()` function that will return `null` instead of throwing an error when a matching element is not found in time.
### Changed

@@ -65,8 +73,4 @@

### Added
## 1.0.0 - 2018-09-25
- Introduced the `tryAndWaitForTheElement()` function that will return `null` instead of throwing an error when a matching element is not found in time.
## [1.0.0] (2018-09-25)
The initial public release.
MIT License
Copyright (c) 2020 - 2021 Luke Phillips
Copyright (c) 2020 - 2024 Luke Phillips

@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

{
"name" : "wait-for-the-element",
"version" : "4.0.1",
"version" : "4.0.2",

@@ -23,7 +23,7 @@ "type" : "module",

"homepage" : "https://github.com/lsphillips/WaitForTheElement",
"homepage" : "https://github.com/lsphillips/wait-for-the-element",
"bugs" :
{
"url" : "https://github.com/lsphillips/WaitForTheElement/issues"
"url" : "https://github.com/lsphillips/wait-for-the-element/issues"
},

@@ -33,21 +33,22 @@

{
"rollup" : "2.58.3",
"rollup-plugin-terser" : "7.0.2",
"@rollup/plugin-node-resolve" : "13.0.6",
"@rollup/plugin-commonjs" : "21.0.1",
"@rollup/plugin-babel" : "5.3.0",
"mocha" : "9.1.3",
"chai" : "4.3.4",
"chai-as-promised" : "7.1.1",
"eslint" : "7.31.0",
"eslint-plugin-import" : "2.23.4",
"eslint-plugin-promise" : "5.1.0",
"eslint-config-protect-me-from-my-stupidity" : "7.2.2",
"karma" : "6.3.6",
"rollup" : "4.17.2",
"@rollup/plugin-terser" : "0.4.4",
"@rollup/plugin-node-resolve" : "15.2.3",
"@rollup/plugin-commonjs" : "25.0.7",
"@rollup/plugin-babel" : "6.0.4",
"mocha" : "10.4.0",
"chai" : "4.4.1",
"chai-as-promised" : "7.1.2",
"eslint" : "8.57.0",
"eslint-plugin-import" : "2.29.1",
"eslint-plugin-promise" : "6.1.1",
"@stylistic/eslint-plugin-js" : "1.8.1",
"eslint-config-protect-me-from-my-stupidity" : "10.1.0",
"karma" : "6.4.3",
"karma-mocha" : "2.0.1",
"karma-mocha-reporter" : "2.2.5",
"karma-rollup-preprocessor" : "7.0.7",
"karma-chrome-launcher" : "3.1.0",
"@babel/core" : "7.15.8",
"@babel/preset-env" : "7.15.8",
"karma-spec-reporter" : "0.0.36",
"karma-rollup-preprocessor" : "7.0.8",
"karma-chrome-launcher" : "3.2.0",
"@babel/core" : "7.24.5",
"@babel/preset-env" : "7.24.5",
"timeout-as-promise" : "1.0.0"

@@ -78,3 +79,3 @@ },

"type" : "git",
"url" : "https://github.com/lsphillips/WaitForTheElement.git"
"url" : "https://github.com/lsphillips/wait-for-the-element.git"
},

@@ -81,0 +82,0 @@

@@ -1,5 +0,5 @@

# WaitForTheElement
# `wait-for-the-element`
[![Available from NPM](https://img.shields.io/npm/v/wait-for-the-element.svg?maxAge=900)](https://www.npmjs.com/package/wait-for-the-element)
[![Built using GitHub Action](https://github.com/lsphillips/WaitForTheElement/actions/workflows/build-and-test.yml/badge.svg?branch=master)](https://github.com/lsphillips/WaitForTheElement/actions)
[![Built using GitHub Action](https://github.com/lsphillips/wait-for-the-element/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/lsphillips/wait-for-the-element/actions)

@@ -6,0 +6,0 @@ A utility library that enables you to efficiently wait for an element to appear or disappear.

@@ -0,0 +0,0 @@ /**

@@ -1,1 +0,1 @@

function t(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,u){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var e,n,o=[],F=!0,i=!1;try{for(r=r.call(t);!(F=(e=r.next()).done)&&(o.push(e.value),!u||o.length!==u);F=!0);}catch(t){i=!0,n=t}finally{try{F||null==r.return||r.return()}finally{if(i)throw n}}return o}(t,r)||u(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,u){if(t){if("string"==typeof t)return r(t,u);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?r(t,u):void 0}}function r(t,u){(null==u||u>t.length)&&(u=t.length);for(var r=0,e=new Array(u);r<u;r++)e[r]=t[r];return e}var e=/\.(?:(?:[\x2D0-9A-Z_a-z\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])|\\(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))+/,n=/#(?:(?:[\x2D0-9A-Z_a-z\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])|\\(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))+/,o=/\[[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*((?:(?:\*|[\x2D0-9A-Z_a-z]*)\|)?(?:(?:[\x2D0-9A-Z_a-z\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+))/g,F={};function i(r){var i=F[r];if(i)return i;i=F[r]={attributes:!0,subtree:!0,childList:!0};var a,l=[],c=function(t,r){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=u(t))||r&&t&&"number"==typeof t.length){e&&(t=e);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var F,i=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return i=t.done,t},e:function(t){a=!0,F=t},f:function(){try{i||null==e.return||e.return()}finally{if(a)throw F}}}}(r.matchAll(o));try{for(c.s();!(a=c.n()).done;){var D=t(a.value,2)[1];if(D.startsWith("*")||D.startsWith("|"))return i;l.push(D.replace("|",":"))}}catch(t){c.e(t)}finally{c.f()}return e.test(r)&&l.push("class"),n.test(r)&&l.push("id"),0===l.length?i.attributes=!1:i.attributeFilter=l,i}function a(t){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=u.timeout,e=void 0===r?2500:r,n=u.scope,o=void 0===n?document:n;return new Promise((function(u){var r=o.querySelector(t);if(null===r){var n=null,F=new MutationObserver((function(){var r=o.querySelector(t);null!==r&&(clearTimeout(n),F.disconnect(),u(r))}));F.observe(o,i(t)),n=setTimeout((function(){F.disconnect(),u(null)}),e)}else u(r)}))}function l(t){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=u.timeout,e=void 0===r?2500:r,n=u.scope,o=void 0===n?document:n;return new Promise((function(u){var r=null;if(null!==o.querySelector(t)){var n=new MutationObserver((function(){null===o.querySelector(t)&&(clearTimeout(r),n.disconnect(),u(!0))}));n.observe(o,i(t)),r=setTimeout((function(){n.disconnect(),u(!1)}),e)}else u(!0)}))}export{a as waitForTheElement,l as waitForTheElementToDisappear};
function t(t,u){(null==u||u>t.length)&&(u=t.length);for(var r=0,e=Array(u);r<u;r++)e[r]=t[r];return e}function u(t,u){return function(t){if(Array.isArray(t))return t}(t)||function(t,u){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var e,n,o,F,i=[],a=!0,l=!1;try{if(o=(r=r.call(t)).next,0===u);else for(;!(a=(e=o.call(r)).done)&&(i.push(e.value),i.length!==u);a=!0);}catch(t){l=!0,n=t}finally{try{if(!a&&null!=r.return&&(F=r.return(),Object(F)!==F))return}finally{if(l)throw n}}return i}}(t,u)||r(t,u)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(u,r){if(u){if("string"==typeof u)return t(u,r);var e={}.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?t(u,r):void 0}}var e=/\.(?:(?:[\x2D0-9A-Z_a-z\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])|\\(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))+/,n=/#(?:(?:[\x2D0-9A-Z_a-z\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])|\\(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))+/,o=/\[[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*((?:(?:\*|[\x2D0-9A-Z_a-z]*)\|)?(?:(?:[\x2D0-9A-Z_a-z\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+))/g,F={};function i(t){var i=F[t];if(i)return i;i=F[t]={attributes:!0,subtree:!0,childList:!0};var a,l=[],c=function(t,u){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=r(t))||u){e&&(t=e);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var F,i=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return i=t.done,t},e:function(t){a=!0,F=t},f:function(){try{i||null==e.return||e.return()}finally{if(a)throw F}}}}(t.matchAll(o));try{for(c.s();!(a=c.n()).done;){var D=u(a.value,2)[1];if(D.startsWith("*")||D.startsWith("|"))return i;l.push(D.replace("|",":"))}}catch(t){c.e(t)}finally{c.f()}return e.test(t)&&l.push("class"),n.test(t)&&l.push("id"),0===l.length?i.attributes=!1:i.attributeFilter=l,i}function a(t){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=u.timeout,e=void 0===r?2500:r,n=u.scope,o=void 0===n?document:n;return new Promise((function(u){var r=o.querySelector(t);if(null===r){var n=null,F=new MutationObserver((function(){var r=o.querySelector(t);null!==r&&(clearTimeout(n),F.disconnect(),u(r))}));F.observe(o,i(t)),n=setTimeout((function(){F.disconnect(),u(null)}),e)}else u(r)}))}function l(t){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=u.timeout,e=void 0===r?2500:r,n=u.scope,o=void 0===n?document:n;return new Promise((function(u){var r=null;if(null!==o.querySelector(t)){var n=new MutationObserver((function(){null===o.querySelector(t)&&(clearTimeout(r),n.disconnect(),u(!0))}));n.observe(o,i(t)),r=setTimeout((function(){n.disconnect(),u(!1)}),e)}else u(!0)}))}export{a as waitForTheElement,l as waitForTheElementToDisappear};

Sorry, the diff of this file is not supported yet