rootsdev / genscrape

JavaScript library that aids in scraping person data off of genealogy websites
MIT License
42 stars 6 forks source link

Add a destroy() method? #37

Open justincy opened 7 years ago

justincy commented 7 years ago

There are two general usecases:

  1. Inject genscrape and listen for all events (AJAX trees could fire multiple events as the user browses)
  2. Inject genscrape, wait for one event, then tear down

genscrape supports usecase (1) right now but doesn't support (2).

Should we add a configuration option that only allows one event to be fired or should we add a destroy() method that apps are expected to call when they want usecase (2)? Perhaps both.

justincy commented 7 years ago

This issue is irrelevant if we commit to #75 because that kills usecase 1 from above and leads to usage where scrapers are expected to clean up when necessary after running.