blob: 816ef7125cc1e47fdf3ce662de752b8ea314f22c (
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
|
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- /
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
'use strict';
var ContextMenu = {
init: function cm_init() {
window.addEventListener('mozbrowsercontextmenu', this, true);
},
handleEvent: function cm_handleEvent(evt) {
var detail = evt.detail;
if (detail.contextmenu.items.length == 0)
return;
var onsuccess = function(action) {
detail.contextMenuItemSelected(action);
};
ListMenu.request(detail.contextmenu.items, '', onsuccess);
}
};
ContextMenu.init();
|