background preloader

Bonnes pratiques

Facebook Twitter

RequestAnimationFrame for smart animating. If you’ve never written code to animate inside the browser, you can stop reading :) What is requestAnimationFrame?

requestAnimationFrame for smart animating

In your animation work, you’ve used a timer loop to make changes every few milliseconds. Good for us: browser vendors have decided, “hey, why don’t we just give you an API for that, because we can probably optimize some things for you.” So it’s basic API for use with animation, whether that be DOM-based styling changes, canvas or WebGL. Front End Development Guidelines. Accessibility What's Up, DOCTYPE?

Front End Development Guidelines

The absence of a DOCTYPE is a crime punishable by death. You may have relied on the following DOCTYPE in the past, but it's important to know that this is now being superseded by a leaner and meaner snippet. Ideally, the HTML5 DOCTYPE should be used. It's supported in all modern browsers, and throws IE6 and IE7 into standards mode. Free Mini Book: Essential JavaScript Design Patterns For Beginners.