[Home] [Download index]

Programmatic CSV download from anchor click

This page creates an anchor in an inline onclick handler and triggers element.click() on it.

  1. Click the synchronous download link.
  2. Expected: a CSV file named test.csv downloads.
  3. Two async variants use setTimeout(..., 0) and often succeed.