{"repo":"uzairfarooq/arrive","free":true,"listed":false,"github":"https://github.com/uzairfarooq/arrive","clone":"git clone https://github.com/uzairfarooq/arrive.git","description":"Watch for DOM elements creation and removal","language":"JavaScript","stars":901,"topics":["javascript","dom","jquery","dynamic","watch","mutation-observers","listen","detect","livequery","nodejs"],"license":"MIT","category":"analytics","readme_excerpt":"arrive.js A lightweight JS library for watching DOM element creation and removal using Mutation Observers. Key Features - Watch for element creation and removal in the DOM - Zero dependencies - Lightweight implementation - Flexible configuration options Installation Or download arrive.min.js directly. Usage Watch for New Elements Promise-based Usage Important: Promise-based syntax resolves only for the first matching element. For monitoring multiple or continuous element creation, use the callback approach described above. Note: There's no need to use the onceOnly option with Promise-based usage as Promises inherently resolve only once. Options The arrive event accepts an optional configuration object: Example: Watch for Elements Removal Use the leave event to detect when elements are removed from the DOM. Important: Due to MutationObserver API limitations, the selector must be direct (e.g., .test-elem ) and cannot use descendant or child combinators (e.g., .page .test-elem is not allowed). Unbinding Event Listeners For better performance, make sure to remove listeners when they are no longer needed: jQuery Support If you use jQuery, you can call all arrive functions on jQuery elements as well: Browser Support arrive.js is built over Mutation Observers which is introduced in DOM4. It's supported in latest versions of all popular browsers. Browser Supported Versions ------------------ :-----------------: Google Chrome 27.0+ Firefox 14.0+ Safari 6.1+ Internet Explorer 11.0+ Ope","default_branch":null,"files":null,"tree":[],"storefront":"/r/uzairfarooq","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/uzairfarooq/arrive/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}