background preloader

ECMAScript 5 compatibility table

ECMAScript 5 compatibility table

Automatically minify and combine JavaScript in Visual Studio - Encosia As you begin developing more complex client-side functionality, managing the size and shape of your JavaScript includes becomes a key concern. It’s all too easy to accidentally end up with hundreds of kilobytes of JavaScript spread across many separate HTTP requests, significantly slowing down your initial page loads. To combat this, it’s important to combine and compress your JavaScript. While there are useful standalone tools and HttpHandler based solutions to the problem already, none of them work quite how I prefer. Instead, I’m going to show you my dead-simple method for automatically compressing and combining script includes. To accomplish that in this post, we will select a compression utility, learn how to use it at the command line, explore a useful automation feature in Visual Studio, and apply that to keep scripts combined and compressed with no ongoing effort. Selecting a JavaScript compression tool The first thing we’ll need is a utility to compress our JavaScript. Conclusion

Dive Into HTML5 Developing for Multi-Touch Web Browsers Introduction Mobile devices such as smartphones and tablets usually have a capacitive touch-sensitive screen to capture interactions made with the user's fingers. As the mobile web evolves to enable increasingly sophisticated applications, web developers need a way to handle these events. Apple introduced their touch events API in iOS 2.0. In this article I’ll dive into the touch events API provided by iOS and Android devices, as well as desktop Chrome on hardware that supports touch, and explore what sorts of applications you can build, present some best practices, and cover useful techniques that make it easier to develop touch-enabled applications. Touch events Three basic touch events are outlined in the spec and implemented widely across mobile devices: touchstart: a finger is placed on a DOM element.touchmove: a finger is dragged along a DOM element.touchend: a finger is removed from a DOM element. Each touch event includes three lists of touches: Touch-enabled apps Demos Best practices

The prototype object of JavaScript The prototype object of JavaScript No, we're not going to discuss how to construct a new version of JavaScript in this tutorial. The prototype object of JavaScript, introduced starting in JavaScript 1.1, is a prebuilt object that simplifies the process of adding custom properties/ methods to all instances of an object. I know, I'm starting to sound a little geeky already, but hay, JavaScript isn't just about fun and games...it's important to learn the serious side of it too. A little background first... In JavaScript, you're allowed to add custom properties to both prebuilt and custom objects. //adding a custom property to a prebuilt object var myimage=new Image() myimage.size="26k" /*adding a custom property to the custom object "circle"*/ //First, create the custom object "circle" function circle(){ } var smallcircle=new circle() smallcircle.pi=3.14159 A custom property added this way only exists for that instance of the object.

Related: