Vinicius Tavares
Vinicius Tavares

Reputation: 653

paper-toast not firing events

I am struggling to hook into some of paper-toast events.

  var toaster = document.querySelector('#infoToast');
  toaster.addEventListener('iron-overlay-closed', function(e) {
    console.log(e);
  });
  toaster.open();

I expected to see a console.log of the event as soon as the toaster was closed, but nothing happens. However, if I hook into iron-announce, the event fires correctly.

What am I doing wrong?

Upvotes: 1

Views: 248

Answers (1)

Günter Zöchbauer
Günter Zöchbauer

Reputation: 657308

The Dart wrapper contains an outdated JS paper-toast element version which doesn't use iron-overlay-behavior and therefore the events aren't fired. I'm also waiting to for an updated version to be published.

Upvotes: 0

Related Questions