Plugin Notify detach window

I was reading the P3D manual, and when i tried to use OnWindowDetach, assuming it detached the p3d file from the browser, it did not work. Am i misunderstanding the callbacks or did i code something wrong?