0

Dears, I'm using "iron-ajax"s events to show a success/failure message. For this i'm using respectively "on-response" and "on-error". It is working fine in "Chrome" but it's not triggered in "Mozilla Firefox". Here is a simple example :

<iron-ajax contentType="{{contentType}}" method="{{method}}" on-response="msgSavedResponse" on-error="msgSavedError" id="ajax" url="{{url}}" headers="{{headers}}" handle-as="json"
           last-response="{{lastResponse}}"></iron-ajax>

Then below in Polymer, I have the following methods :

  msgSavedResponse: function(){
      this.$.successToast.text=this.localize('msg.success');
      this.$.successToast.show();
      this.$.messageDialog.close();  
  },
  msgSavedError: function(){
      this.$.errorToast.text=this.localize('msg.fail');
      this.$.errorToast.show();
      this.$.messageDialog.close();  
  },
user2447161
  • 277
  • 4
  • 12

1 Answers1

2

You forgot to pass the event argument to your handler. For me the events normally worked in FX - does your console show any errors?

You can also set bubbles property to true and see if that changes anything.

Ergo
  • 1,205
  • 9
  • 16
  • Thanks for your reply. Unfortunately, it didn't help. There are no error message in the console – user2447161 May 29 '17 at 17:23
  • My apologizes. The bubbles=true made the difference ! I didn't notice it because Firefox kept the old .html in cache. Thanks a lot ! – user2447161 May 30 '17 at 00:33