codice:
self.document.location.reload()

self è un oggetto window non un document