Added a document context as DOM abstraction