convert saveAs prompt to dom dialog