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

Unified Diff: ext/background.js

Issue 5646124035604480: Issue 154 - Added UI for devtools panel on Chrome (Closed)
Patch Set: Rebased and adapted for API changes Created March 12, 2015, 4:08 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
Index: ext/background.js
===================================================================
--- a/ext/background.js
+++ b/ext/background.js
@@ -80,4 +80,17 @@
{
window.open("http://example.com/options.html", "_blank");
};
+
+ global.ext.devtools = {
+ onCreated: {
+ addListener: function(listener)
+ {
+ window.addEventListener("message", function(event)
+ {
+ if (event.data.type == "devtools")
+ listener(new ext.Page(event.source));
+ });
+ }
+ }
+ };
})(this);

Powered by Google App Engine
This is Rietveld