waypoints
waypoints copied to clipboard
Elements no longer in the DOM should be removed on refresh
While poking around with removing elements, I noticed that elements that have been removed from the DOM still have their listeners and such stored in the Context.
These elements are never truly cleaned up and remain because there's a reference to them from the waypoint object.
Can we possibly remove the waypoints on refresh if we notice that the elements are no longer in the DOM?
Here's an untested patch: https://gist.github.com/patrick-mcdougle/0d72e18f9f52cc586a6c025f7ab6745f/revisions