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

Unified Diff: chrome/content/frameScript.js

Issue 29322778: Issue 2816 - Partial fix for EHH button in inspector tool, preview functionality still broken (Closed)
Patch Set: Unified code paths Created July 29, 2015, 12:23 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/content/composer.js ('k') | lib/aardvark.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/content/frameScript.js
===================================================================
new file mode 100644
--- /dev/null
+++ b/chrome/content/frameScript.js
@@ -0,0 +1,31 @@
+/*
+ * This Source Code is subject to the terms of the Mozilla Public License
+ * version 2.0 (the "License"). You can obtain a copy of the License at
+ * http://mozilla.org/MPL/2.0/.
+ */
+
+(function()
+{
+ const Cu = Components.utils;
+
+ let rand = Components.stack.filename.replace(/.*\?/, "");
+ let module = "chrome://elemhidehelper/content/actor.jsm?" + rand;
+ let {shutdown, getNodeInfo} = Cu.import(module, {});
+
+ addMessageListener("ElemHideHelper:Shutdown", onShutdown);
+ addMessageListener("ElemHideHelper:GetNodeInfo", onGetNodeInfo);
+
+ function onShutdown()
+ {
+ shutdown();
+ Cu.unload(module);
+ removeMessageListener("ElemHideHelper:Shutdown", onShutdown);
+ removeMessageListener("ElemHideHelper:GetNodeInfo", onGetNodeInfo);
+ }
+
+ function onGetNodeInfo(message)
+ {
+ let info = getNodeInfo(message.objects.element);
+ message.objects.callback(info.nodeData, info.host);
+ }
+})();
« no previous file with comments | « chrome/content/composer.js ('k') | lib/aardvark.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld