Several demos use <iron-ajax> for fetching data. As of P3, when the component is a JS file, it feels very strange to define the data fetching as HTML inside of a string instead of using fetch directly in JS.
Using fetch would also make the demos less Polymer bound and easier to approach for non-Polymer devs.
@marcushellberg Y'all just need to make vaadin-ajax that uses fetch under it all ;-)
Haha. I'm still not sold on declarative AJAX 馃榾I could still somehow accept it when Polymer Components were HTML files, as you could fetch some data without writing any JS. But now, when you're already in JS, writing a template as a string to essentially do a JS call just feels... backwards.
@marcushellberg Honestly, I just like the ancillary functions around debouncing, query string encoding, lifecycle event firing, etc. I already have a custom component for my API calls that does a
this.request = document.createElement('iron-ajax');
I'll probably switch that over to fetch at some point in time, but that would mean recreating all the above functions, or finding a good npm package that already does.
The demo files are loaded dynamically, so the source must be in ES5 (in order for them to function on IE11)
We can consider using fetch polyfill but need to make sure it would be properly loaded by demos hosted on https://vaadin.com
The demos have been updated and <iron-ajax> is no longer used. The one demo that fetches data from an external source uses XHRs https://cdn.vaadin.com/vaadin-grid/5.2.0-alpha4/demo/#grid-data-demos
Most helpful comment
We can consider using fetch polyfill but need to make sure it would be properly loaded by demos hosted on https://vaadin.com