# Dom Node vs VNode manipulatoin

**URL:** <https://discourse.dojo.io/t/dom-node-vs-vnode-manipulatoin/281>\
**Category:** Dojo 2+ users\
**Created:** [September 16, 2018, 1:19pm UTC](https://discourse.dojo.io/t/dom-node-vs-vnode-manipulatoin/281 "2018-09-16T13:19:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ebcken](https://avatars.discourse-cdn.com/v4/letter/e/49beb7/32.png) [@ebcken](https://discourse.dojo.io/u/ebcken)\
**Post date:** [September 16, 2018, 1:19pm UTC](https://discourse.dojo.io/t/dom-node-vs-vnode-manipulatoin/281/1 "2018-09-16T13:19:26Z")

</div>

Struggling a bit to get a handle on how to modify document content (add/remove DOM nodes) at runtime as I make the transition from DOJO 1.x to DOJO 2/3.

For example, at startup, we have a document that includes SVG content (built with HTML source) and some DOJO 3 widgets with control buttons and an initially empty ‘svg canvas’ work area (empty div element) created during the top widget’s render method.

I want a user to click a button, and then move that SVG content from its initial area onto the DOJO 3 ‘svg canvas’ widget (for editing purposes). If this were simple Javascript, I’d clone or move the SVG node and add it as a child to the div (svg canvas) element.

Is that type of DOM manipulation (using getELementByID, add DOM node’s) still OK as ‘standard practice’ with DOJO 3; if not what is the best practice to move a DOM node into the tree of DOJO 3 widgets?

---

<div class="post-metadata">

**Author:** ![dylan](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.dojo.io/dylan/32/5_2.png) [@dylan](https://discourse.dojo.io/u/dylan)\
**Post date:** [September 19, 2018, 10:16pm UTC](https://discourse.dojo.io/t/dom-node-vs-vnode-manipulatoin/281/2 "2018-09-19T22:16:14Z")

</div>

I would check out [https://github.com/dojo/framework/blob/master/src/widget-core/README.md#inserting-dom-nodes-into-the-vdom-tree](https://github.com/dojo/framework/blob/master/src/widget-core/README.md#inserting-dom-nodes-into-the-vdom-tree) which I believe answers your questions. Let me know if anything isn’t clear fromt his info!

-Dylan
