-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Description
I'm currently trying VueJS 2 and noticed a change when using it on existing DOM
Indeed everytime VueJS is initialised it will do something on existing DOM and will remove events previously binded outside of VueJS.
// We bind an event
document.querySelector('#demo').addEventListener('click', function () {
alert("i'm a button")
})
// and it's lost when Vue is binded
new Vue({
el: '#vuejs'
})
This same example works fine with VueJS1. I don't have enough understanding of Vue core to understand what changed between the two version of the compiler.js
that would explain this change.
Metadata
Metadata
Assignees
Labels
No labels