summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/omnibox_result.js
blob: 1b3107af9c4a7b7ac8728638414c34f358607f02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright 2013 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.

/**
 * @fileoverview Click handler for omnibox results.
 */

(function() {
/**
 * The origin of the embedding page.
 * This string literal must be in double quotes for proper escaping.
 * @type {string}
 * @const
 */
var EMBEDDER_ORIGIN = "{{ORIGIN}}";

window.addEventListener('click', function(event) {
  top.postMessage({click: event.button}, EMBEDDER_ORIGIN);
});

window.addEventListener('contextmenu', function(event) {
  event.preventDefault();
});
})();