Topic on Talk:Notifications

Is there a callback?

2
Edokter (talkcontribs)

I want to query Echo from a gadget to see if there is a pending notification. I first tried by using .hasClass('mw-badge-important'), but that is not reliable as the class is added after my gadget has run. Is there a callback I can call, or am I forced to use the API? Also, what does the "web interface" entail?

Edokter (talkcontribs)

To answer my own question: mw.echo.overlay.notificationCount.

Reply to "Is there a callback?"