Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 809180 - Provide some feature detection for private browsing implementations
: Provide some feature detection for private browsing implementations
Product: Add-on SDK
Classification: Client Software
Component: General (show other bugs)
: unspecified
: x86 Mac OS X
: P1 normal (vote)
: ---
Assigned To: Erik Vold [:erikvold] (please needinfo? me)
Depends on: 825338
Blocks: sdk-pwpb
  Show dependency treegraph
Reported: 2012-11-06 12:40 PST by Jeff Griffiths (:canuckistani) (:⚡︎)
Modified: 2013-01-23 13:31 PST (History)
8 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---


Description Jeff Griffiths (:canuckistani) (:⚡︎) 2012-11-06 12:40:30 PST
We're going to have an awkward growing phase between Firefox 19 & 20 where private browsing features are implemented quite differently. Seeing as we will be continuing to implement activate and deactivate as no-ops that emit deprecation warnings for the forseeable future, we should consider implementing a flag that developers can access that indicates if PWPB is implemented in the current runtime.


var hasPWPB = require('private-browsing').hasPerWindowPrivateBrowsing || false;

This property could be a getter that sniffs the current Firefox version.

Thanks to :wenzel for the idea:
Comment 1 Erik Vold [:erikvold] (please needinfo? me) 2012-11-11 06:35:32 PST
I don't think pwpb will be the final iteration, so perhaps a getPBType method would make more sense?
Comment 2 :Ehsan Akhgari (Away Oct 25 - Nov 9) 2012-12-13 14:05:49 PST
If you're interested in detecting this in the code programatically, you can check for the existence of nsIPrivateBrowsingService.  We will soon remove it in bug 818800.
Comment 3 Erik Vold [:erikvold] (please needinfo? me) 2013-01-23 13:31:47 PST

Note You need to log in before you can comment on or make changes to this bug.