Fix TypeError: document.querySelectorAll(...).forEach is not a function
Bug: T298910 Change-Id: Iaa67f36278af7805c5d915737d6b30e98b3f8484
This commit is contained in:
parent
84ed8343c2
commit
d9ef1ad66d
|
@ -35,10 +35,10 @@ function bind() {
|
||||||
*/
|
*/
|
||||||
function bindCloseOnUnload() {
|
function bindCloseOnUnload() {
|
||||||
addEventListener( 'beforeunload', function () {
|
addEventListener( 'beforeunload', function () {
|
||||||
document.querySelectorAll( CHECKBOX_HACK_CHECKBOX_SELECTOR + ':checked' )
|
var checkboxes = document.querySelectorAll( CHECKBOX_HACK_CHECKBOX_SELECTOR + ':checked' );
|
||||||
.forEach( function ( checkbox ) {
|
Array.prototype.forEach.call( checkboxes, function ( checkbox ) {
|
||||||
/** @type {HTMLInputElement} */ ( checkbox ).checked = false;
|
/** @type {HTMLInputElement} */ ( checkbox ).checked = false;
|
||||||
} );
|
} );
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue