Detecting Mozilla App Install Capabilities with JavaScript

Feature detection is the best way to discover if the user's browser can install Mozilla Marketplace applications:


var canInstallMozApp = !!(navigator.mozApps && navigator.mozApps.install);