Announcement

Collapse
No announcement yet.

'addEventListener' of undefined

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 'addEventListener' of undefined

    I open the Task page then
    Uncaught TypeError: Cannot read property 'addEventListener' of undefined error ?

    Detail:
    Code:
    this.$el.on('drop', function (e) {
                        e.preventDefault();
                        e.stopPropagation();
                        var e = e.originalEvent;
                        if (e.dataTransfer && e.dataTransfer.files && e.dataTransfer.files.length) {
                            this.uploadFiles(e.dataTransfer.files);
                        }
                    }.bind(this));
    
                   [COLOR=#FF0000][U] this.$el.get(0).addEventListener('dragover', function (e) {[/U][/COLOR]
                        e.preventDefault();
                    }.bind(this));
                    this.$el.get(0).addEventListener('dragleave', function (e) {
                        e.preventDefault();
                    }.bind(this));
                }
Working...
X