// container *must* be attached to document so events work correctly.
document.body.appendChild(container);
document.body.appendChild(container);
});
});
@ -416,7 +415,7 @@ it("changes value when clicked", () => {
});
});
```
```
Different DOM events and their properties are described in [MDN](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent). Note that you need to pass `{ bubbles: true }` in each event you create for it to reach the React listener because React automatically delegates events to the document.
Different DOM events and their properties are described in [MDN](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent). Note that you need to pass `{ bubbles: true }` in each event you create for it to reach the React listener because React automatically delegates events to the root.