barisaydinoglu / Detectizr

A Modernizr extension to detect device, device model, screen size, operating system, and browser details
http://barisaydinoglu.github.io/Detectizr
MIT License
413 stars 77 forks source link

Tests failing in Firefox #14

Closed miketaylr closed 10 years ago

miketaylr commented 10 years ago

Not sure if the tests are actually used (in their sparse state :P), but both useragent tests fail in Firefox.

The reason being that the userAgent property is readonly [1], per spec [2].

[1] http://mxr.mozilla.org/mozilla-central/source/dom/webidl/Navigator.webidl#45 [2] http://www.whatwg.org/specs/web-apps/current-work/#the-navigator-object

A simple fix would be to define a getter for the userAgent property that returns newUserAgent of changeUserAgent.

barisaydinoglu commented 10 years ago

Fixed with commit 6129b75d4f874a8d7b738bd4793c381df12661e0