Browse Source

remove legacy event delegation code

Evan You 12 years ago
parent
commit
15c07520f7
2 changed files with 2 additions and 11 deletions
  1. 1 1
      src/directives/if.js
  2. 1 10
      src/directives/repeat.js

+ 1 - 1
src/directives/if.js

@@ -11,7 +11,7 @@ module.exports = {
 
     update: function (value) {
 
-        var el       = this.el
+        var el = this.el
 
         if (!this.parent) { // the node was detached when bound
             if (!el.parentNode) {

+ 1 - 10
src/directives/repeat.js

@@ -175,8 +175,6 @@ module.exports = {
         }
 
         this.reset()
-        // attach an object to container to hold handlers
-        this.container.vue_dHandlers = utils.hash()
         // if initiating with an empty collection, we need to
         // force a compile so that we get all the bindings for
         // dependency extraction.
@@ -311,8 +309,7 @@ module.exports = {
             data: data,
             compilerOptions: {
                 repeat: true,
-                parentCompiler: this.compiler,
-                delegator: ctn
+                parentCompiler: this.compiler
             }
         })
         item.$index = index
@@ -410,12 +407,6 @@ module.exports = {
                 }
             }
         }
-        var ctn = this.container,
-            handlers = ctn.vue_dHandlers
-        for (var key in handlers) {
-            ctn.removeEventListener(handlers[key].event, handlers[key])
-        }
-        ctn.vue_dHandlers = null
     },
 
     unbind: function () {