“Uncaught ReferenceError: DOM is not defined”

后端 未结 2 1633
-上瘾入骨i
-上瘾入骨i 2020-12-19 13:17

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\':



        
2条回答
  •  执笔经年
    2020-12-19 13:35

    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.

提交回复
热议问题