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

Unified Diff: chrome/browser/resources/ntp4/new_tab.js

Issue 668983004: Add <a is="action-link">, a web component extension of <a> for in-page actions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 6 years, 2 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
« no previous file with comments | « chrome/browser/resources/ntp4/new_tab.html ('k') | chrome/browser/resources/ntp4/new_tab_theme.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/ntp4/new_tab.js
diff --git a/chrome/browser/resources/ntp4/new_tab.js b/chrome/browser/resources/ntp4/new_tab.js
index 50a58dceacb7dac9c65e6180152888ceacdc3c6c..020d1f86b9e9e79f84fc1606a52416b0f3687de7 100644
--- a/chrome/browser/resources/ntp4/new_tab.js
+++ b/chrome/browser/resources/ntp4/new_tab.js
@@ -299,7 +299,6 @@ cr.define('ntp', function() {
startTime = Date.now();
});
- preventDefaultOnPoundLinkClicks(); // From webui/js/util.js.
cr.ui.FocusManager.disableMouseFocusOnButtons();
}
@@ -463,16 +462,13 @@ cr.define('ntp', function() {
var linksBin = $('notificationLinks');
linksBin.textContent = '';
for (var i = 0; i < links.length; i++) {
- var link = linksBin.ownerDocument.createElement('div');
+ var link = linksBin.ownerDocument.createElement('a', 'action-link');
link.textContent = links[i].text;
link.action = links[i].action;
link.onclick = function() {
this.action();
hideNotification();
};
- link.setAttribute('role', 'button');
- link.setAttribute('tabindex', 0);
- link.className = 'link-button';
linksBin.appendChild(link);
}
« no previous file with comments | « chrome/browser/resources/ntp4/new_tab.html ('k') | chrome/browser/resources/ntp4/new_tab_theme.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698