Is it safe to use app._container
#9188
-
Hello, When getting the Vue current instance, we can get the Vue app container by calling If not, do you plan to expose a safe solution to get the Vue app container? I think it can be usefull. Regards. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The app container is the root node where the entire application mount. This node can be modified through native js, so there is no security issue because any dom can be accessed and modified. |
Beta Was this translation helpful? Give feedback.
The app container is the root node where the entire application mount. This node can be modified through native js, so there is no security issue because any dom can be accessed and modified.
getCurrentInstance().appContext.app. _container
is an internal attribute. I think using it is not a correct behavior. It is not a public API. The risks brought by using or modifying it are expected.