Make it compatible with Safari.. the open function does not return any document. Thanks to Ingmar Stein PR: 26953