Not sure if this is a Mozilla-specific JS syntax, but I often found variables being declared this way, for example, in add-on SDK docs:
var { Hotkey } = require(sdk/hotkeys);
and in various chrome Javascript (let
statement is being used in place of var
),
let { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components;
I found it very confusing but I am not being able to find any documentation about both syntax, even on MDN.