Bug 1331638 is a good example of why feature detection is important, but also a good reminder to test in enviroments where the feature totally doesn’t exist. A website (Twitter, in this example) tries to do the right thing and check for support before throwing notifications at you: this.isSupported = function() { var a = "PushManager" in window, b = this.getNotificationPermission() !== "denied", c