dom.js
function onChange(event) { try {
		if (remove()) { return; }
		resolve(Array.from(input.files)); // actually got file(s)
	} catch (error) { reject(error); } }
function onChange(event) { try {
		if (remove()) { return; }
		resolve(Array.from(input.files)); // actually got file(s)
	} catch (error) { reject(error); } }
after dialog close, wait for 'change'