mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00

This patch: 1. Changes `SimpleChannel` to buffer messages to the namespace that hasn't been registered yet. This allows us to create `SimpleChannel` per target on the browser side right away. 2. Removes multisession support. Now there's only one `PageAgent` in the content process, which talks to a single `PageHandler` on the browser side. Both ends can be created as-soon-as-needed; thanks to `SimpleChannel` bufferring, no messages will be lost and all messages will be delivered in proper order. (This is currently the reason why build 1178 flakes on windows). 3. Straightens up the target reporting. Targets are reported as soon as they appear on the browser side. **NOTE:** this doesn't yet remove sessions from protocol. References #3995
21 lines
593 B
JavaScript
21 lines
593 B
JavaScript
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
class AccessibilityHandler {
|
|
constructor(session, contentChannel) {
|
|
this._contentPage = contentChannel.connect('page');
|
|
}
|
|
|
|
async getFullAXTree(params) {
|
|
return await this._contentPage.send('getFullAXTree', params);
|
|
}
|
|
|
|
dispose() {
|
|
this._contentPage.dispose();
|
|
}
|
|
}
|
|
|
|
var EXPORTED_SYMBOLS = ['AccessibilityHandler'];
|
|
this.AccessibilityHandler = AccessibilityHandler;
|