Skip to content

bad low level API call #366

Closed
Closed
@boussou

Description

@boussou

(Not a big deal)
on vue/src/directives/on.js:

reset function should be :
reset: function () {
var el = this.iframeBind
? this.el.contentWindow
: this.el
this.handler && el.removeEventListener(this.arg, this.handler)
},

Added code is "this.handler && "
Reason: at init, call to removeEventListener() while this.handler is null
according to specs, calls must always have the handler
https://developer.mozilla.org/en-US/docs/Web/API/EventTarget.removeEventListener

This happens because in update() function " this.reset() " (line 4253) is called before this.handler (line 4256) is defined.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions