Added on-close attribute document.