On Friday, November 29, 2013 4:24:33 AM UTC-8, iker....@fon.com wrote:
> Hi,
> 
> 
> 
> It was impsoible for me to make work setTimeout on FirefoxOS. I have tested 
> on Firefox and chrome laptop browsers and works fine.. so i have made a 
> little example like this..
> 
> 
> 
> index.html
> 
> -------------
> 
> <html>
> 
>       <head>
> 
>       </head>
> 
>       <body>
> 
>               <script src="jquery.min.js"></script>
> 
>               <script src="main.js"></script>
> 
>       </body>
> 
> </html>
> 
> 
> 
> 
> 
> main.js
> 
> --------------
> 
> $(function(){
> 
> 
> 
>       function make_alert(){
> 
>               alert('hola');
> 
>               setTimeout(function(){make_alert();},1000);
> 
>       }
> 
> 
> 
>       function start(){
> 
> 
> 
>               make_alert();
> 
>       }
> 
> 
> 
>       start();
> 
> 
> 
> });
> 
> 
> 
> 
> 
> this is a very simple example, that should run an alert every 1 second. This 
> runs on all browsers but not in FirefoxOS..
> 
> 
> 
> i have read about security issues but i do not know how to do it work or 
> something similar.
> 
> 
> 
> Regards.

setTimeout works just fine in Firefox OS. In my recent blog post 
http://firefoxosgaming.blogspot.com/2013/12/svg-collision-detection-game-programming.html,
 I have two different setTimeout timers going as well as the cool 
requestAnimationFrame (working in conjunction with one of the timers). It 
shouldn't make a difference, but I always create a variable for the name of my 
timer in case I want to cancel it later.
_______________________________________________
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to