I understand this line of D3 code which adds an SVG element to the body of an HTML page, and stores a reference to the new element in the variable \'svg\':
To expand on the previous answer, DOM is indeed part of the standard library in Observable. You can use it and the rest of the standard library methods outside of Observable by exporting or embedding a notebook, as described in the Downloading and Embedding Notebooks documentation page.