figured out dumb mistake in basicframe which was that the frame was making a frame inside itself so there was no way the windowlistener would work

change ghetto method of creating and deleteing a file with a sleep of 1000 on opening browser page to just deleting all .html files I create when the program is closed