Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: chrome/content/frameScript.js

Issue 29322778: Issue 2816 - Partial fix for EHH button in inspector tool, preview functionality still broken (Closed)
Left Patch Set: Another work-in-progress approach, previous changes reverted Created July 29, 2015, 11:58 a.m.
Right Patch Set: Preemptively fixed some nits and compatibility info Created July 29, 2015, 12:41 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « chrome/content/composer.js ('k') | lib/aardvark.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This Source Code is subject to the terms of the Mozilla Public License 2 * This Source Code is subject to the terms of the Mozilla Public License
3 * version 2.0 (the "License"). You can obtain a copy of the License at 3 * version 2.0 (the "License"). You can obtain a copy of the License at
4 * http://mozilla.org/MPL/2.0/. 4 * http://mozilla.org/MPL/2.0/.
5 */ 5 */
6 6
7 (function() 7 (function()
8 { 8 {
9 const Cu = Components.utils; 9 const Cu = Components.utils;
10 10
11 let rand = Components.stack.filename.replace(/.*\?/, ""); 11 let rand = Components.stack.filename.replace(/.*\?/, "");
12 let module = "chrome://elemhidehelper/content/actor.jsm?" + rand; 12 let module = "chrome://elemhidehelper/content/actor.jsm?" + rand;
13 let {shutdown} = Cu.import(module, {}); 13 let {shutdown, getNodeInfo} = Cu.import(module, {});
14 14
15 addMessageListener("ElemHideHelper:Shutdown", onShutdown); 15 addMessageListener("ElemHideHelper:Shutdown", onShutdown);
16 addMessageListener("ElemHideHelper:GetNodeInfo", onGetNodeInfo);
16 17
17 function onShutdown() 18 function onShutdown()
18 { 19 {
19 shutdown(); 20 shutdown();
20 Cu.unload(module); 21 Cu.unload(module);
21 removeMessageListener("ElemHideHelper:Shutdown", onShutdown); 22 removeMessageListener("ElemHideHelper:Shutdown", onShutdown);
23 removeMessageListener("ElemHideHelper:GetNodeInfo", onGetNodeInfo);
24 }
25
26 function onGetNodeInfo(message)
27 {
28 let info = getNodeInfo(message.objects.element);
29 message.objects.callback(info.nodeData, info.host);
22 } 30 }
23 })(); 31 })();
LEFTRIGHT

Powered by Google App Engine
This is Rietveld