Skip to content

Commit

Permalink
fix: Updates attachToDocument documentation tip (#1852)
Browse files Browse the repository at this point in the history
Closes #1725

Updates  attachToDocument documentation tip from the div boilerplate from #1584 & #1611 to the new handling from #1578 & #1699
  • Loading branch information
RaphaelDDL committed Jun 13, 2021
1 parent 9efab90 commit 9c05f2e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions docs/api/options.md
Expand Up @@ -336,15 +336,12 @@ wrapper.destroy()
`attachToDocument` is deprecated and will be removed in future releases. Use [`attachTo`](#attachto) instead. For example, if you need to attach the component to the document.body:

```js
const elem = document.createElement('div')
if (document.body) {
document.body.appendChild(elem)
}
wrapper = mount(Component, {
attachTo: elem
attachTo: document.body
})
```

For more information, see [`attachTo`](#attachto)'s tip above.
:::

Like [`attachTo`](#attachto), but automatically creates a new `div` element for you and inserts it into the body.
Expand Down

0 comments on commit 9c05f2e

Please sign in to comment.