Javascript Document object is a part of Window object, and provides various methods to modify the web page dynamically, such as through the API known as Document Object Model (DOM). All web pages openned by a browser are Document objects.
document.write("test content line 1");
document.write("test content line 2");
var win = window.open();
win.document.open();
win.document.write("test content");
win.document.close();