Closed NicolaiNNielsen closed 3 months ago
Turns out that the order of the query parameters matter which is not documented anywhere.
We solved above issue by setting the callback param as the first in the list, which is the same pattern as when generated within polyfill.io.
If the CDN is so locked on the order of query parameters, it must be documented properly to avoid errors. Our callback where running the main.js file for the whole site, and since it was not returned and run, our site javascript was never triggered. I think the real solution should be to make the endpoint query order-agnostic
both url is working now.
Bug report
What
When using device simulation using the Google Chrome web-inspector, the callback is not returned in the api response.
Details
In the attached screenshots i have shown the returned code from the same request url, but called from two different simulations in the developer tools (One being responsive mode, and one being a preset device from Chrome). Please note that some devices will work while others wont. When looking at the bottom of each response you will see that one includes the callback function and one dosen't.
Environment Browser: Chrome 122.0.6261.112 Device: Macbook Pro M2 Max, Desktop