Граф коммитов

1 Коммитов

Автор SHA1 Сообщение Дата
Andreas Tolfsen 9ac995ab12 Bug 1400225 - Subscribe to and relay web content DOM events. r=automatedtester,whimboo
This makes it possible to subscribe to DOM events in web content, in
order to facilitate fixes for cases such as https://bugzil.la/1397007.

Although the current interface, WebElementEventTarget, is associated with
browser.Context (curBrowser) it is the intention that we in the future
will associate this with representations of the marshaled web element.
This will make it quack and act like an Element's EventTarget, which
has nice parity to it.

The WebElementEventTarget works by passing IPC messages to
a backend service in the content frame script implemented by
ContentEventObserverService.  This registers event handlers for specific
DOM events, and relays these events back to the browser-specific message
handler in chrome.

This will enable chrome code to wait for events to occur in content,
like this:

	await new Promise(resolve => {
	  webElement.addEventListener("visibilitychange", resolve, {once: true});
	  contentBrowser.minimize();
	});

MozReview-Commit-ID: B8MMHyG8n04

--HG--
extra : rebase_source : 25ac77fbcfb09435325719ac61614c4a8ce37996
2017-09-15 17:07:41 +01:00