You can not listen to click events in <object>
dom elements.
I expect to be able to listen to the events. Also if an element has an <object>
element as a child (or descendant) the events do not work either, i.e. <a @click="whatever"><object...></object></a>
new Vue({
el: "#app",
data: {
width: 200,
},
methods: {
shot: function(todo){
alert('hey')
}
}
})
body {
background: #20262E;
padding: 20px;
font-family: Helvetica;
}
#app {
background: #fff;
border-radius: 4px;
padding: 20px;
transition: all 0.2s;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.16/vue.min.js"></script>
<div id="app">
<object v-on:click="width+20" type="image/svg+xml" :width="width" data="https://dwglogo.com/wp-content/uploads/2017/09/Vue-logo-001.svg">
<!--Fallback content would go here-->
</object>
</div>