Create browsers directory and browsers/common for common navigator.gssEap.js, move...
[gssweb.git] / browsers / firefox / data / navigator.gss.js
1 console.log("Bob is here. #2");
2
3 function addScript(url) {
4   var elt = document.createElement("script");
5   elt.setAttribute("src",   url );
6   elt.setAttribute('type', 'text/javascript');
7   document.body.appendChild(elt);
8 }
9
10 addScript('chrome://gssweb/content/nav.gss.js');
11
12 self.port.on('alert', function(message) {
13   console.log("Content script received message: " + message);
14   self.port.emit("gss_request", "Message back from the content script");
15 });
16
17
18 var msg = {
19   'method': 'gss_import_name',
20   'arguments': {
21     'input_name': 'HTTP@localhost',
22     'input_name_type': "{1 2 840 113554 1 2 1 4 }"
23   },
24   'cookies': {
25       'app_tag': 'Test request'
26   }
27 };
28
29 self.port.on('gss_response', function(message) {
30   console.log("Content script received a reply from gss_import_name: " + JSON.stringify(message) );
31 });
32 self.port.emit("gss_request", msg);