Remove window. from visualViewport, use local variable instead (#621)

This commit is contained in:
toasted-nutbread 2020-06-22 19:27:40 -04:00 committed by GitHub
parent 65c41975a6
commit 96932119f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -106,8 +106,8 @@ class Frontend {
const visualViewport = window.visualViewport;
if (visualViewport !== null && typeof visualViewport === 'object') {
window.visualViewport.addEventListener('scroll', this._onVisualViewportScroll.bind(this));
window.visualViewport.addEventListener('resize', this._onVisualViewportResize.bind(this));
visualViewport.addEventListener('scroll', this._onVisualViewportScroll.bind(this));
visualViewport.addEventListener('resize', this._onVisualViewportResize.bind(this));
}
yomichan.on('orphaned', this._onOrphaned.bind(this));