Skip to content

Commit

Permalink
split out window events into window/tab and chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
ilanasegall committed Apr 23, 2013
1 parent 179610c commit 12390f7
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/chrome-events.js
@@ -0,0 +1,2 @@
"use strict";
//chrome events
4 changes: 3 additions & 1 deletion lib/main.js
Expand Up @@ -14,8 +14,10 @@ let study; // useful to have it in main scope
let {instrumentOptions} = require("instrument-options");

//include scripts that will emit heatmap messages
//runs by side-effect
require("global-state-events");
require("window-events");
require("window-tab-events");
require("chrome-events");
require("in-content-events");
//normally add search events, but ignore for st

Expand Down
51 changes: 51 additions & 0 deletions lib/window-tab-events.js
@@ -0,0 +1,51 @@
"use strict";

//open/activate
//chrome events; event handlers
//in content?

const {emit} = require("./utils");

var newWinFun = {
onTrack: function (window) {
emit("Tracking a window: " + window.location, + ", " + window.id);
},
onUntrack: function (window) {
emit("Untracking a window: " + window.location);
}
};

var tabs = require("sdk/tabs");

tabs.on('open', function onOpen(tab) {
emit("Tab opened: " + tab.id)
});
//all tabs events

//note actions that are being pushed directly



let chromeEvents = function(){

}

let windowEventTracker = function(){
var winUtils = require("window-utils");
var tracker = new winUtils.WindowTracker(newWinFun);
}();

let tabEventTracker = function(){


}();

//isbrowser()? --> jetpack


//pump out onto a channel and recording into instrument options
//require unload; remove contextMenuTracker etc



//window vs chrome

0 comments on commit 12390f7

Please sign in to comment.