I was trying to solve a problem on mobile safari where, in response to a button press, I need to synchronously load some json and then set the src on an audio element. It has to be synchronous on mobile safari:
(https://stackoverflow.com/questions/24690258/html5-audio-tag-cannot-raise-event-canplay-on-mobile)
The json file is loaded fine without the sync property set, and the json is parsed so that currentTarget.lastResponse is a javascript object.
Setting the sync property on the iron-ajax element stops it being parse, so I now have to parse it myself.
That is unexpected.
Expected outcome
Json is parsed inside iron-ajax, just as when asynchornous.
Description
I was trying to solve a problem on mobile safari where, in response to a button press, I need to synchronously load some json and then set the src on an audio element. It has to be synchronous on mobile safari: (https://stackoverflow.com/questions/24690258/html5-audio-tag-cannot-raise-event-canplay-on-mobile) The json file is loaded fine without the sync property set, and the json is parsed so that currentTarget.lastResponse is a javascript object. Setting the sync property on the iron-ajax element stops it being parse, so I now have to parse it myself. That is unexpected.
Expected outcome
Json is parsed inside iron-ajax, just as when asynchornous.
Actual outcome
A string of json is returned.