O'Reilly logo

HTML5 Web Application Development By Example Beginner's guide by J.M. Gustafson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Queuing up changes

Now we've bound the user controls to the data model and automatically save it every time a change is made. There's one problem with this though. Input controls like the number or time types that have spinners associated with them cause a change event every time a spinner button is clicked. If the user holds a spinner button down it will fire change events at an alarming rate. This will in turn save the task list to localStorage repeatedly in a very short period of time. That doesn't seem like a very efficient thing to do, especially if you have a lot of data.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required