diff --git a/docs/api/options.md b/docs/api/options.md index a006d6a52..b79e7efb7 100644 --- a/docs/api/options.md +++ b/docs/api/options.md @@ -323,7 +323,18 @@ wrapper.destroy() - default: `false` ::: warning Deprecation warning -`attachToDocument` is deprecated and will be removed in future releases. Use [`attachTo`](#attachto) instead. +`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 +}) +``` + ::: Like [`attachTo`](#attachto), but automatically creates a new `div` element for you and inserts it into the body.