Rename _onDocumentStart => _onApiDocumentStart for consistency (#1939)

This commit is contained in:
toasted-nutbread 2021-09-08 14:49:00 -04:00 committed by GitHub
parent 9b86b5a56e
commit 6b566e0329
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -125,7 +125,7 @@ class Backend {
['triggerDatabaseUpdated', {async: false, contentScript: true, handler: this._onApiTriggerDatabaseUpdated.bind(this)}], ['triggerDatabaseUpdated', {async: false, contentScript: true, handler: this._onApiTriggerDatabaseUpdated.bind(this)}],
['testMecab', {async: true, contentScript: true, handler: this._onApiTestMecab.bind(this)}], ['testMecab', {async: true, contentScript: true, handler: this._onApiTestMecab.bind(this)}],
['textHasJapaneseCharacters', {async: false, contentScript: true, handler: this._onApiTextHasJapaneseCharacters.bind(this)}], ['textHasJapaneseCharacters', {async: false, contentScript: true, handler: this._onApiTextHasJapaneseCharacters.bind(this)}],
['documentStart', {async: false, contentScript: true, handler: this._onDocumentStart.bind(this)}] ['documentStart', {async: false, contentScript: true, handler: this._onApiDocumentStart.bind(this)}]
]); ]);
this._messageHandlersWithProgress = new Map([ this._messageHandlersWithProgress = new Map([
]); ]);
@ -742,7 +742,7 @@ class Backend {
return this._japaneseUtil.isStringPartiallyJapanese(text); return this._japaneseUtil.isStringPartiallyJapanese(text);
} }
_onDocumentStart(params, sender) { _onApiDocumentStart(params, sender) {
const {tab, frameId, url} = sender; const {tab, frameId, url} = sender;
if (typeof url !== 'string' || typeof tab !== 'object' || tab === null) { return; } if (typeof url !== 'string' || typeof tab !== 'object' || tab === null) { return; }
this._updateTabAccessibility(url, tab, frameId); this._updateTabAccessibility(url, tab, frameId);