Skip to content

Commit 9c05f2e

Browse files
authored
fix: Updates attachToDocument documentation tip (#1852)
Closes #1725 Updates attachToDocument documentation tip from the div boilerplate from #1584 & #1611 to the new handling from #1578 & #1699
1 parent 9efab90 commit 9c05f2e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Diff for: docs/api/options.md

+2-5
Original file line numberDiff line numberDiff line change
@@ -336,15 +336,12 @@ wrapper.destroy()
336336
`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:
337337

338338
```js
339-
const elem = document.createElement('div')
340-
if (document.body) {
341-
document.body.appendChild(elem)
342-
}
343339
wrapper = mount(Component, {
344-
attachTo: elem
340+
attachTo: document.body
345341
})
346342
```
347343

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

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

0 commit comments

Comments
 (0)