[SOLVED] How can I tell if the browser supports notifications

Answered Closed
0
0

I’ve been attempting to play with the notifications extension and I’ve finally figured out that it doesn’t work with IE.  Would it be possible to have the Application.Browser.Features also include Notification support?

Thanks

Nic

  • You must to post comments
Best Answer
0
0

It should already include it. This is the initialization of the features map from the client passed in together with the first load request.

 

 var data = {
 hash: location.hash.substr(1),
 browserSize: this.browserSize,
 screenSize: { width: screen.width, height: screen.height },
 os: this.platform.getSystemName(),
 device: this.platform.getDeviceType(),
 browser: this.platform.getBrowserName(),
 version: this.platform.getBrowserVersion(),
 fullScreen: window.fullScreenApi ? window.fullScreenApi.isFullScreen() : false,
 features: {
 webSocket: ("WebSocket" in window),
 arrayBuffer: ("ArrayBuffer" in window),
 notification: ("Notification" in window),
 geolocation: ("geolocation" in navigator),
 localStorage: ("Storage" in window),
 speechSynthesis: (window.speechSynthesis) != null,
 fullScreen: window.fullScreenApi ? window.fullScreenApi.supportsFullScreen : false,
 speechRecognition: (window.speechRecognition || window.webkitSpeechRecognition || window.mozSpeechRecognition) != null,
 },
 language: language
 };
  • You must to post comments
0
0

So it does – my bad. I should have looked.

Nic

  • You must to post comments
Showing 2 results