Most commonly, you work with the document the script is running in by using
document in document's scripts. (The same document can also be referred to as
window.document.)  Ex.