blob: df5c5f7e7757014f0a28552fc8390cdb6e8e480d [file] [log] [blame]
/* Copyright 2018 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file. */
'use strict';
/**
* JavaScript for reset_password.html, served from chrome://reset-password/.
*/
(function() {
/** @type {mojom.ResetPasswordHandler} */
let uiHandler;
function initialize() {
uiHandler = new mojom.ResetPasswordHandlerPtr;
Mojo.bindInterface(
mojom.ResetPasswordHandler.name, mojo.makeRequest(uiHandler).handle);
/** @type {?HTMLElement} */
const resetPasswordButton = $('reset-password-button');
resetPasswordButton.addEventListener('click', function() {
uiHandler.handlePasswordReset();
});
}
document.addEventListener('DOMContentLoaded', initialize);
})();