closescript

“closescript” is a script attribute. If specified, when the object is closed, the script will run. If not specified, the object will be closed automatically.

See also close.