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

Unified Diff: Source/devtools/front_end/ui/ContextMenu.js

Issue 651783004: DevTools: REGRESSION: can not copy Link address in console (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: for landing 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 | « Source/devtools/front_end/toolbox_bootstrap/Toolbox.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/ui/ContextMenu.js
diff --git a/Source/devtools/front_end/ui/ContextMenu.js b/Source/devtools/front_end/ui/ContextMenu.js
index 6297985f0fbf455f657500f10703f012760bdaaf..dd2efc3e4c4698d01e81759d3dd7aa9cafd4b89f 100644
--- a/Source/devtools/front_end/ui/ContextMenu.js
+++ b/Source/devtools/front_end/ui/ContextMenu.js
@@ -224,6 +224,24 @@ WebInspector.ContextMenu.initialize = function()
}
}
+/**
+ * @param {!Document} doc
+ */
+WebInspector.ContextMenu.installHandler = function(doc)
+{
+ doc.body.addEventListener("contextmenu", handler, false);
+
+ /**
+ * @param {!Event} event
+ */
+ function handler(event)
+ {
+ var contextMenu = new WebInspector.ContextMenu(event);
+ contextMenu.appendApplicableItems(/** @type {!Object} */ (event.target));
+ contextMenu.show();
+ }
+}
+
WebInspector.ContextMenu.prototype = {
/**
* @return {number}
« no previous file with comments | « Source/devtools/front_end/toolbox_bootstrap/Toolbox.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698