mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
Bug 1853302 - [bidi] Do not send browsingContext.userPromptOpened event for unsupported prompt types. r=webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D188711
This commit is contained in:
parent
8cd256b8d7
commit
cde1bb94e8
@ -1285,6 +1285,12 @@ class BrowsingContextModule extends Module {
|
||||
#onPromptOpened = async (eventName, data) => {
|
||||
if (this.#subscribedEvents.has("browsingContext.userPromptOpened")) {
|
||||
const { contentBrowser, prompt } = data;
|
||||
|
||||
// Do not send opened event for unsupported prompt types.
|
||||
if (!(prompt.promptType in UserPromptType)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const contextId = lazy.TabManager.getIdForBrowser(contentBrowser);
|
||||
// This event is emitted from the parent process but for a given browsing
|
||||
// context. Set the event's contextInfo to the message handler corresponding
|
||||
|
Loading…
Reference in New Issue
Block a user