Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7098)

Unified Diff: chrome/browser/resources/welcome/welcome.js

Issue 2338213007: Adding JS and C++ handlers for events on new Welcome page. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/welcome/welcome.js
diff --git a/chrome/browser/resources/welcome/welcome.js b/chrome/browser/resources/welcome/welcome.js
index 102537742e9aff3fbbeb2106553d968d56fa75e5..8625f3ff453f9ec04205f54455a5d07effd53e72 100644
--- a/chrome/browser/resources/welcome/welcome.js
+++ b/chrome/browser/resources/welcome/welcome.js
@@ -2,5 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// TODO(tmartino): Add handlers.
-console.log('JS test');
+document.addEventListener('DOMContentLoaded', function() {
anthonyvd 2016/09/19 17:12:15 You can take a look at https://cs.chromium.org/chr
+ $('accept_button').addEventListener('click', function() {
+ chrome.send('handleActivateSignIn');
+ });
+
+ $('decline_button').addEventListener('click', function() {
+ chrome.send('handleUserDecline');
+ });
+});

Powered by Google App Engine
This is Rietveld 408576698