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

Side by Side Diff: chrome/browser/resources/omnibox_result.js

Issue 13375003: Fixing iframe jank in the local omnibox popup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing cc comments. Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 /**
Dan Beam 2013/04/05 01:07:37 does this need a copyright?
Jered 2013/04/05 15:30:23 Done.
2 * @fileoverview Click handler for omnibox results.
3 */
4
5 /**
6 * The origin of the embedding page.
7 * Must be in double quotes for proper escaping.
Dan Beam 2013/04/05 01:07:37 what must be in double quotes? please clarify
Jered 2013/04/05 15:30:23 Done.
8 * @type {string}
9 * @const
10 */
11 var EMBEDDER_ORIGIN = "%s";
12
13 function handleClick(event) {
14 var clickMessage = {'click': event.button};
15 top.postMessage(clickMessage, EMBEDDER_ORIGIN);
Dan Beam 2013/04/05 01:07:37 top.postMessage({click: event.button}, EMBEDDER_OR
Jered 2013/04/05 15:30:23 Done.
16 }
17
18 document.addEventListener('DOMContentLoaded', function() {
Dan Beam 2013/04/05 01:07:37 why do you need to wait until DOMContentLoaded?
Jered 2013/04/05 15:30:23 I don't. Done.
19 window.addEventListener('click', handleClick, false);
20 });
Dan Beam 2013/04/05 01:07:37 why is this all in the global namespace?
Jered 2013/04/05 15:30:23 Where would be better? (This script will be the on
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698