Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add more detailed support info for FormData methods in Safari #2988
As I needed the data in a project, I've tested the support of the FormData methods in several Safari versions via Browserstack. It's based on inspecting the
Hi there! This mostly looks fine, but I think the 3-argument version of append() (AppendWithFileName) is supported in Safari 10, not 9.
I tested all this by writing myself a simple test case, putting it at https://chrisdavidmills.github.io/formdata-test/, and testing it on different versions of Safari via SauceLabs.
The newer methods all appear in the object from Safari 11 onwards, so you are right on those.
But the try catch block only passes from Safari 10 onwards. It fails and explodes and makes the demo show no results from 9 downwards, which was not quite the result I was expecting, but I've not got time to fix it at the moment, and I think it still shows a good indication.
@chrisdavidmills Thanks for checking things!
I've looked into your example on Safari 9. There has been an error in the for loop that prevented the test results from being shown. The
Here's a reduced codepen example where I've fixed it. If you look at it in a Safari 9 browser you'll see that the syntax is supported:
Another hint is shown when you inspect a FormData object: