HTML <object> tag completely recreates the vue app i a new inline element
See original GitHub issueVersion
3.8.0
Reproduction link
https://github.com/calexandru2018/vuejs-SPA
Environment info
Environment Info:
System:
OS: Linux 4.19 Manjaro Linux undefined
CPU: (4) x64 Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
Binaries:
Node: 12.9.1 - /usr/bin/node
Yarn: Not Found
npm: 6.11.3 - /usr/bin/npm
Browsers:
Chrome: Not Found
Firefox: 69.0.1
npmPackages:
@vue/babel-helper-vue-jsx-merge-props: 1.0.0
@vue/babel-plugin-transform-vue-jsx: 1.0.0
@vue/babel-preset-app: 3.8.0
@vue/babel-preset-jsx: 1.0.0
@vue/babel-sugar-functional-vue: 1.0.0
@vue/babel-sugar-inject-h: 1.0.0
@vue/babel-sugar-v-model: 1.0.0
@vue/babel-sugar-v-on: 1.0.0
@vue/cli-overlay: 3.8.0
@vue/cli-plugin-babel: ^3.8.0 => 3.8.0
@vue/cli-plugin-eslint: ^3.8.0 => 3.8.0
@vue/cli-plugin-pwa: ^3.8.0 => 3.8.0
@vue/cli-service: ^3.8.0 => 3.8.4
@vue/cli-shared-utils: 3.8.0
@vue/component-compiler-utils: 2.6.0
@vue/eslint-config-standard: ^4.0.0 => 4.0.0
@vue/preload-webpack-plugin: 1.1.0
@vue/web-component-wrapper: 1.2.0
eslint-plugin-vue: ^5.0.0 => 5.2.2 (4.7.1)
vue: ^2.6.10 => 2.6.10
vue-cli-plugin-vuetify: ^0.5.0 => 0.5.0
vue-eslint-parser: 2.0.3 (5.0.0)
vue-hot-reload-api: 2.3.3
vue-loader: 15.7.0
vue-router: ^3.0.3 => 3.0.6
vue-style-loader: 4.1.2
vue-template-compiler: ^2.6.10 => 2.6.10
vue-template-es2015-compiler: 1.9.1
vue2-touch-events: ^2.0.0 => 2.0.0
vuetify: ^1.5.16 => 1.5.16
vuex: ^3.0.1 => 3.1.1
npmGlobalPackages:
@vue/cli: 3.11.0
Steps to reproduce
- Create a Vue-Cli project with the default setup 3.Add a image(svg) at your choice in the “assets” folder 4.Create at the least one additional component that is not rendered/displayed on main page upon running “npm run serve” (with a v-if and a control variable) 5.Insert the following code inside the newly created component: “<“object type=“image/svg xml” data=”…/assets/[filename].svg”></object">" (remove the extra ") 6.Call the component
What is expected?
It is expected that a object with the svg appears.
What is actually happening?
The whole Vue app is re-rendered inside itself, a sorts of inception.
Tested on three different projects, same result on all of them. I wanted to create an inline svg object so that it could be manipulated.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
How To Use Inline-level and Block-level Elements in HTML
This tutorial will teach you the difference between inline-level and block-level elements in HTML and how they affect a piece of content's ...
Read more >Objects, Images, and Applets in HTML documents
The new OBJECT element thus subsumes some of the tasks carried out by ... The IMG element has no content; it is usually...
Read more >Using SVG and Vue.js: A complete guide - LogRocket Blog
This is a complete guide to using SVG with Vue, including practical examples and best practices to help you along the way.
Read more >Dynamically Switching From One HTML Element to Another in ...
A friend once contacted me asking if I had a way to dynamically change one HTML element into another within Vue's template block....
Read more >Dynamic & Async Components - Vue.js
That's because each time you switch to a new tab, Vue creates a new instance of the currentTabComponent . Recreating dynamic components is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Can’t run it right now, but that’s likely because
src
onimg
etc.)<object>
Solution:
Sorry for late response, I managed to test it a bit deeper and have fixed per your recommendation in
Thank you for the tip Linus, I am closing the issue.