зеркало из https://github.com/mozilla/gecko-dev.git
Bug 800905 - Load script in to every new tab. r=davidb
This commit is contained in:
Родитель
40f937b977
Коммит
1578e3ed94
|
@ -99,6 +99,7 @@ var AccessFu = {
|
|||
Services.obs.addObserver(this, 'Accessibility:NextObject', false);
|
||||
Services.obs.addObserver(this, 'Accessibility:PreviousObject', false);
|
||||
Services.obs.addObserver(this, 'Accessibility:CurrentObject', false);
|
||||
this.chromeWin.addEventListener('TabOpen', this);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -118,6 +119,8 @@ var AccessFu = {
|
|||
|
||||
Input.detach();
|
||||
|
||||
this.chromeWin.removeEventListener('TabOpen', this);
|
||||
|
||||
Services.obs.removeObserver(this, 'remote-browser-frame-shown');
|
||||
Services.obs.removeObserver(this, 'Accessibility:NextObject');
|
||||
Services.obs.removeObserver(this, 'Accessibility:PreviousObject');
|
||||
|
@ -205,10 +208,20 @@ var AccessFu = {
|
|||
},
|
||||
|
||||
handleEvent: function handleEvent(aEvent) {
|
||||
if (aEvent.type == 'mozContentEvent' &&
|
||||
aEvent.detail.type == 'accessibility-screenreader') {
|
||||
this._systemPref = aEvent.detail.enabled;
|
||||
this._enableOrDisable();
|
||||
switch (aEvent.type) {
|
||||
case 'mozContentEvent':
|
||||
{
|
||||
if (aEvent.detail.type == 'accessibility-screenreader') {
|
||||
this._systemPref = aEvent.detail.enabled;
|
||||
this._enableOrDisable();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'TabOpen':
|
||||
{
|
||||
this._loadFrameScript(Utils.getMessageManager(aEvent.target));
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче