MyPage is a personalized page based on your interests.The page is customized to help you to find content that matters you the most.


I'm not curious

'deviceorientation' in Firefox?

0
Closing Date: 20 December 14
Started on: 20 October 14
Participants: 1
I'm working with 'deviceorientation' on my laptop and an example jsfiddle seems to work fine in Chrome but is not responding in Firefox. I think that line 15 of JS is not working somehow...

window.addEventListener('deviceorientation', devOrientHandler, false);
The MozOrientation version on line 18 doesn't seem to be picking up the slack

window.addEventListener('MozOrientation', mozDevOrientHandler, false);
Just updated Firefox. And no change. I've tried to test on a desktop and (unsurprisingly) the machine doesn't seem to have the necessary accelerometers/sensors so the fiddle doesn't work on any browser on that machine. I've been scouring questions, reading the w3c specs, the MDN support and I still can't get it.

Does anybody know if this is a Firefox issue? Did I mess up settings or something? Any help is much appreciated. Any ideas as to why that example jsfiddle isn't working on Firefox? note: the example "green ball" in the MDN link above isn't working on FF either. First time asking a question on SO.

Thanks!

Edit: I should clarify that the jsfiddle is the best example I could find, and is NOT my code. I believe it was from HTML5rocks.com but I can't find that source.





I'm working with 'deviceorientation' on my laptop and an example jsfiddle seems to work fine in Chrome but is not responding in Firefox. I think that line 15 of JS is not working somehow...

window.addEventListener('deviceorientation', devOrientHandler, false);

The MozOrientation version on line 18 doesn't seem to be picking up the slack

window.addEventListener('MozOrientation', mozDevOrientHandler, false);

Just updated Firefox. And no change. I've tried to test on a desktop and (unsurprisingly) the machine doesn't seem to have the necessary accelerometers/sensors so the fiddle doesn't work on any browser on that machine. I've been scouring questions, reading the w3c specs, the MDN support and I still can't get it.

Does anybody know if this is a Firefox issue? Did I mess up settings or something? Any help is much appreciated. Any ideas as to why that example jsfiddle isn't working on Firefox? note: the example "green ball" in the MDN link above isn't working on FF either. First time asking a question on SO.

Thanks!

Edit: I should clarify that the jsfiddle is the best example I could find, and is NOT my code. I believe it was from HTML5rocks.com but I can't find that source.

This challenge is listed under Development & Implementations , Digital Media & Games and Mobility Community

Related Posts:

JavaScript

 

Dynamic HTML

 

Firefox

 

Initiator

Ajay
Ajay
  Follow

i am full time web developer. and part time Technology Blogger. love to write about Mobile Technology, PHP, mobile apps, e-commerce etc

1 Suggestion

  1. 23 October 14
    0

    Firefox currently does not expose DeviceOrientation events for any Desktop software. The event handler is not triggered for the reason that the API is not enabled in their Desktop browser builds.

    While in mobile web browsers it is better and is the main target for this API. Major mobile browsers (like Safari on iOS, Chrome, Opera, Firefox on Android) support this event in its un-prefixed form i.e. window.addEventListener('deviceorientation', function(event) { /* ... */ }, false).

Awards & Accolades for MyTechLogy
Winner of
REDHERRING
Top 100 Asia
Finalist at SiTF Awards 2014 under the category Best Social & Community Product
Finalist at HR Vendor of the Year 2015 Awards under the category Best Learning Management System
Finalist at HR Vendor of the Year 2015 Awards under the category Best Talent Management Software
Hidden Image Url

Back to Top