Bug 1813716 - Encapsulate aboutwelcome container and make its ID more unique. r=omc-reviewers,fxview-reviewers,sfoster,jprickett

Differential Revision: https://phabricator.services.mozilla.com/D172493
This commit is contained in:
Shane Hughes
2023-03-29 21:51:09 +00:00
parent 475b77df74
commit ca232ede40
10 changed files with 77 additions and 85 deletions

View File

@@ -5,9 +5,10 @@
// If the container has a "page" data attribute, then this is
// a Spotlight modal or Feature Callout. Otherwise, this is
// about:welcome and we should return the current page.
const page = document.querySelector("#root.onboardingContainer[data-page]")
? document.querySelector("#root[data-page]").dataset.page
: document.location.href;
const page =
document.querySelector(
"#multi-stage-message-root.onboardingContainer[data-page]"
)?.dataset.page || document.location.href;
export const AboutWelcomeUtils = {
handleUserAction(action) {