Download a File via JavaScript

Each of the following buttons implements a File Download in different ways using JavaScript. This might be a risk for cross browser testing, are there any other risks?