Skip to content

Instantly share code, notes, and snippets.

@wbamberg
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wbamberg/9126673 to your computer and use it in GitHub Desktop.
Save wbamberg/9126673 to your computer and use it in GitHub Desktop.
let mdnRequest = require("sdk/request").Request({
url: "https://developer.mozilla.org/en-US/search.json?q=" + currentCssProperty + "&topic=css",
onComplete: showTheDocSummary
});
mdnRequest.get();
...
function showTheDocSummary(response) {
if (response.status == 200) {
let json = response.json;
let excerpt = json.documents[0].excerpt;
let docURL = json.documents[0].url;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment