Topic: instance.addEventListener is not a function

Pellegrino priority asked 2 years ago


This code returns error: instance.addEventListener is not a function

Example

const instance = mdb.Alert.getInstance(document.getElementById('example')); instance.addEventListener('closed.mdb.alert', () => { alert("ss")});


Dawid Wajszczuk staff answered 2 years ago


Hi,

It seems to be some kind of bug. We will try to fix it as soon as possible.

Keep coding,
Dawid


stephenwilson1984 free commented 2 years ago

Hi,

I'm also having this issue. Has there been any update on it?


Dawid Wajszczuk staff commented 2 years ago

Everything is working fine in MDB 3.10.1. Here is the snippet https://mdbootstrap.com/snippets/standard/d-wajszczuk/3589935. Check your console after clicking close.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • User: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: 3.2.0
  • Device: pc
  • Browser: chrome
  • OS: windows
  • Provided sample code: No
  • Provided link: No