This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//main.js | |
var cm = require("sdk/context-menu"); | |
var item = cm.Item({ | |
label: "Search on google", | |
data: "MyId", | |
//context: cm.PageContext() | |
//context: cm.URLContext(["*.mozilla.org","*.reddit.com"]) | |
//context: cm.SelectionContext() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//silly.js | |
function sumNumbers(a, b){ | |
return a+b; | |
} | |
function sumNumbersAsync(a, b, callback){ | |
var result = a + b; | |
callback(result); | |
} |