NewsFirefox 4 JavaScript Offers Multitouch and Math Optimization

Firefox 4 JavaScript Offers Multitouch and Math Optimization content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

Mozilla has released the third beta for Firefox 4, and with it comes JavaScript optimizations and support for multitouch interaction on Windows.

Ars Technica’s Ryan Paul reports, “Mozilla’s developers have created new APIs that will make it possible for individual websites to handle and respond to multitouch input. Developers will be able to bind JavaScript functions to a set of ‘MozTouch’ events that are triggered when touchscreen interaction occurs. There is also a special CSS media query that can be used to apply custom styles on devices that have touch support enabled.

Another important improvement is how Mozilla’s JavaScript engine handles tagged integers.

Paul says, “The new system uses Fat Values, which are 64 bits wide. It typically uses the first half of the space to store the tag and the second half to store the value or pointer to the value. For floating point numbers and bigger integers, it can use the full 64 bits. This change means that floating point numbers can be retrieved faster during JavaScript execution, leading to better performance on mathematically intensive code.

You can download the Firefox 4 beta here. Release notes are available here.

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Latest Posts

Related Stories