Implement DOM-specified Document() constructor