puppeteer/lib
Philipp Hagemeister 067662c677
Emit change event on uploadFile calls (#5389)
In puppeteer 1.20.0, the following code emitted an alert:
```
const puppeteer = require('puppeteer');

(async () => {
	const browser = await puppeteer.launch({args: ['--no-sandbox'], headless: false});
	const page = (await browser.pages())[0];

	await page.setContent(`
		<input type=file>
		<script>
		document.querySelector('input').addEventListener('change', () => {
			alert('Uploaded a file');
		});
		</script>
		`);
	const input = await page.waitForSelector('input[type="file"]');
	await input.uploadFile(__filename);
})();
```

A bisection yielded 6091a34a36 as the commit that broke this.

Emitting the change event as well seems to fix the problem.
2020-03-12 17:26:03 +01:00
..
.eslintrc.js Introduce Eslint to validate style 2017-06-11 01:32:59 -07:00
Accessibility.js feat(chromium): roll Chromium to r705776 (#5058) 2019-10-23 11:41:44 +02:00
api.js feat(page): introduce file chooser interception (#4653) 2019-07-22 21:30:49 -07:00
Browser.js feat(browser): Add browser.isConnected() (#4403) 2019-05-09 16:24:52 -07:00
BrowserFetcher.js (feat) Add option to fetch Firefox Nightly (#5467) 2020-03-10 21:59:03 +01:00
Connection.js chore: introduce //lib/api.js (#3835) 2019-01-25 23:21:14 -05:00
Coverage.js chore: introduce //lib/api.js (#3835) 2019-01-25 23:21:14 -05:00
DeviceDescriptors.js feat: update DeviceDescriptors to include 6.5 inch iPhone XR and similar (#4846) 2019-08-14 17:19:33 -07:00
Dialog.js chore: introduce //lib/api.js (#3835) 2019-01-25 23:21:14 -05:00
DOMWorld.js feat(api): add element.select and element.evaluate for consistency (#4892) 2019-09-04 15:19:34 -07:00
EmulationManager.js chore: upgrade to TypeScript 3.0.1 (#3024) 2018-08-06 11:31:33 -07:00
Errors.js feat: introduce puppeteer/Errors (#3056) 2018-08-09 16:51:12 -07:00
Events.js refactor: consolidate all events in Events.js (#3772) 2019-01-14 19:57:05 -08:00
ExecutionContext.js feat(chromium): roll Chromium to r722269 (#5289) 2020-01-27 14:44:53 +01:00
externs.d.ts feat(launcher): add option to run Puppeteer with different browsers (#5137) 2019-11-26 10:23:19 +01:00
FrameManager.js refactor: Pass FrameManager to NetworkManager constructor (#4907) 2019-09-04 18:11:58 -07:00
helper.js feat(launcher): add option to run Puppeteer with different browsers (#5137) 2019-11-26 10:23:19 +01:00
Input.js fix: avoid unnecessary zero-delays in input code (#4934) 2019-10-21 08:29:56 +02:00
JSHandle.js Emit change event on uploadFile calls (#5389) 2020-03-12 17:26:03 +01:00
Launcher.js (feat) Add option to fetch Firefox Nightly (#5467) 2020-03-10 21:59:03 +01:00
LifecycleWatcher.js chore: use map instead of plain object (#5068) 2019-10-23 13:12:33 +02:00
Multimap.js chore: upgrade to TypeScript 3.0.1 (#3024) 2018-08-06 11:31:33 -07:00
NetworkManager.js refactor: Pass FrameManager to NetworkManager constructor (#4907) 2019-09-04 18:11:58 -07:00
Page.js fix(filechooser): quick fix for the headful file chooser (#5369) 2020-01-31 08:43:34 +01:00
PipeTransport.js fix(pipe): handle 'error' events on pipes to avoid crashing (#4705) 2019-07-15 17:53:27 -07:00
Puppeteer.js (feat) Add option to fetch Firefox Nightly (#5467) 2020-03-10 21:59:03 +01:00
Target.js feat(chromium): roll Chromium to r686378 (#4841) 2019-08-14 21:43:18 -07:00
TaskQueue.js chore(types): Upgrade TypeScript to 3.2.2 (#3754) 2019-01-10 22:56:39 -08:00
TimeoutSettings.js feat(page): introduce page.setDefaultTimeout (#3854) 2019-01-28 17:16:12 -08:00
Tracing.js feat(page): move page.pdf to protocol streams (#4587) 2019-06-14 22:36:06 -07:00
USKeyboardLayout.js feat(keyboard): feature phone buttons (#4694) 2019-07-12 15:41:01 -07:00
WebSocketTransport.js fix(connection): bump websocket max received message size to 256Mb (#4571) 2019-06-14 01:05:09 -07:00
Worker.js chore: introduce //lib/api.js (#3835) 2019-01-25 23:21:14 -05:00