added document.visualizerOutputToFile() to DOM interface, so that it can be called from the extension.