Bug 1604594 - decouple accessibility walker front from the MainFrame component. r=rcaliman

Differential Revision: https://phabricator.services.mozilla.com/D58031

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Yura Zenevich 2020-02-21 04:35:22 +00:00
Родитель 58f2ee8198
Коммит 602ffe9c2e
1 изменённых файлов: 6 добавлений и 10 удалений

Просмотреть файл

@ -78,11 +78,9 @@ class MainFrame extends Component {
componentWillMount() {
this.props.accessibility.on("init", this.resetAccessibility);
this.props.accessibility.on("shutdown", this.resetAccessibility);
this.props.accessibilityWalker.on(
"document-ready",
this.resetAccessibility
);
this.props.startListeningForAccessibilityEvents({
"document-ready": this.resetAccessibility,
});
window.addEventListener("resize", this.onPanelWindowResize, true);
}
@ -95,11 +93,9 @@ class MainFrame extends Component {
componentWillUnmount() {
this.props.accessibility.off("init", this.resetAccessibility);
this.props.accessibility.off("shutdown", this.resetAccessibility);
this.props.accessibilityWalker.off(
"document-ready",
this.resetAccessibility
);
this.props.stopListeningForAccessibilityEvents({
"document-ready": this.resetAccessibility,
});
window.removeEventListener("resize", this.onPanelWindowResize, true);
}