From 9c05f2e11e1cf956a9127a66b54e39824331b1ee Mon Sep 17 00:00:00 2001 From: Raphael DDL Oliveira Date: Sun, 13 Jun 2021 08:31:16 -0300 Subject: [PATCH] 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 --- docs/api/options.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/api/options.md b/docs/api/options.md index 1bbdd2ae0..c2f31793b 100644 --- a/docs/api/options.md +++ b/docs/api/options.md @@ -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.