From 71094b75ef4fcd6b24c157e26865dd58b81dee79 Mon Sep 17 00:00:00 2001 From: Mark Finkle Date: Tue, 9 Jun 2009 21:59:18 -0400 Subject: [PATCH] Bug 497098: add imageURL getter to nsContextMenu for extension compat, r=gavin --- browser/base/content/nsContextMenu.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/browser/base/content/nsContextMenu.js b/browser/base/content/nsContextMenu.js index e73b53cbf36..d8525e42f81 100644 --- a/browser/base/content/nsContextMenu.js +++ b/browser/base/content/nsContextMenu.js @@ -1402,5 +1402,11 @@ nsContextMenu.prototype = { var clipboard = Cc["@mozilla.org/widget/clipboardhelper;1"]. getService(Ci.nsIClipboardHelper); clipboard.copyString(this.mediaURL); + }, + + get imageURL() { + if (this.onImage) + return this.mediaURL; + return ""; } };