Skip to content

Instantly share code, notes, and snippets.

@xabolcs
Created October 27, 2012 17:31
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 xabolcs/3965443 to your computer and use it in GitHub Desktop.
Save xabolcs/3965443 to your computer and use it in GitHub Desktop.
Moving forward from nightly.variables.toolkit == "cairo"
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
var gfxInfo = Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfo); gfxInfo.getInfo().toSource();
/**
* Example output:
* ({AzureCanvasBackend:"cairo", AzureFallbackCanvasBackend:"none", AzureContentBackend:"none"})
*
* Or:
* Error: gfxInfo.getInfo is not a function
*
* Or even:
* Error: Cc['@mozilla.org/gfx/info;1'] is undefined
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment