| 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); |