onclose

“onclose” specifies the script to run after the object is closed.