[ ] I've checked out the code and tested it myself.
Changes
Now the unused tables will be deleted as soon as the user reloads the tab where Flottform was working, or leaves that tab entirely.
Limitations:
1) For now the listeners that clean the tables are added multiple times inside the page context. We need to find a way to avoid that.
2) When dealing with single page applications, if we don't reload the tab not leave it but instead navigate to another page the array won't be deleted because the event beforeunload won't be fired! We also need to find a way to delete the array for this case.
Checklist
Reviewer
Changes
Now the unused tables will be deleted as soon as the user reloads the tab where Flottform was working, or leaves that tab entirely.
Limitations: 1) For now the listeners that clean the tables are added multiple times inside the page context. We need to find a way to avoid that. 2) When dealing with single page applications, if we don't reload the tab not leave it but instead navigate to another page the array won't be deleted because the event
beforeunload
won't be fired! We also need to find a way to delete the array for this case.