I am not very well-versed in JS and could not understand how to apply similar answers to my question, so I would appreciate your help and advice.
What I'm Making: I am working on a webview pop-up. It has a close button at the bottom that I want to be animated the same as the in-app buttons.
How I'm Doing It:
I am currently closing it simply with <a href="#" onclick="window.close(); return false;"><img class="button" src="img.png"></a>
.
I have a webkit animation that changes on img.button:active
mode.
My Issue:
I want the transition to complete before the window closes. I know that I must use addEventListener
to check when the transition has ended, but I cannot seem to do this correctly with window.close()
. Is there a good way to do this?
I have not been able to figure this out by myself reading tons of documentation all day.