html5


06
Apr 12

Taking an Entire Page Offline using the HTML5 FileSystem API

Let’s face it AppCache is annoying and has problems [ 1 2 3 ] One big limitation is the fact that it’s impossible to dynamically cache assets on demand Essentially this makes it an all or nothing thing when it comes to taking an app offline Either everything in the manifest is cached up front or nothing is cached

The HTML5 FileSystem API becomes an attractive solution for AppCache’s shortcomings One can programmatically store files and folder hierarchies in the local (sandboxed) filesystem and subsequently add/update/remove individual resources as necessary My colleague…..


04
Apr 12

Drag and Drop and Automatically Send to the Server

I realised (when looking myself) that there are a lot of demos and tutorials that show you how to drag-and-drop a file into the browser and then render it on the page They’re often labelled as “drag-and-drop and upload” but they actually don’t upload This tutorial will take you that final step

I’ll walk you through an example that you can play with : drag a file into the web page and it’ll be uploaded to the server instantly

Tasks #

Let’s break this process down…..


31
Mar 12

CSS layout gets smarter with calc()

Creating a nice CSS layout starts with assigning sizes for all the things being placed in a web application One highly requested feature has always been the ability to specify sizes using a mixture of sizing units For example it’d be nice to be able to reserve 50% of an area plus a fixed amount of space say 10px Well you can do that right now using the calc() property You can use this feature anywhere a length or number is used so you can use it for positioning things or in rgb() color values…..


28
Mar 12

Using Modernizr to detect HTML5 features and provide fallbacks

Modernizr is a JavaScript library that detects which HTML5 and CSS3 features your visitor’s browser supports In detecting feature support it allows developers to test for some of the new technologies and then provide fallbacks for browsers that do not support them This is called feature detection and is much more efficient than browser sniffing

Modernizr is very useful for detecting CSS3 support but this article will focus on HTML5 The principles are essentially the same though

It’s important to note that Modernizr doesn’t “fill in the gaps”…..


23
Mar 12

Introduction to JavaScript Source Maps

…..


18
Mar 12

Optimizing JavaScript

JavaScript is relatively fast but it can always go faster Read more about how to optimize your JavaScript for performance

How to write low garbage real-time JavaScript from Scirra the HTML5 game making tool

Optimizing for V8 – Introduction is written by Florian Loitsch engineer on Dart’s JavaScript generation

Optimizing for V8 – Inling Deoptimizations is part 2 in Florian’s series

From Console to Chrome – HTML5 and JavaScript for game developers from Lilli Thompson Chrome Games engineer …..


07
Mar 12

A New Experimental Feature: scoped stylesheets

Chromium recently implemented a new feature from HTML5: scoped stylesheets aka <style scoped> A web author can limit style rules to only apply to a part of a page by setting the ‘scoped’ attribute on a <style> element that is the direct child of the root element of the subtree you want the styles to be applied to This limits the styles to affect just the element that is the parent of the <style> element and all of its descendants

Example

Here’s a simple document that uses standard styling:

…..


06
Mar 12

A New Experimental Feature:

Chromium recently implemented a new feature from HTML5: scoped stylesheets aka <style scoped> A web author can limit style rules to only apply to a part of a page by setting the ‘scoped’ attribute on a <style> element that is the direct child of the root element of the subtree you want the styles to be applied to This limits the styles to affect just the element that is the parent of the <style> element and all of its descendants

Example

Here’s a simple document that uses standard styling:

…..


04
Mar 12

Developing Game Audio with the Web Audio API

…..


29
Feb 12

CSS3 Pseudo-Classes and HTML5 Forms

Hello! I’m Doctor Peter and I’m here to treat you with a dose of complementary CSS3 Don’t worry this won’t hurt a bit

Contrary to what HTML5 Please and the W3C would have you believe CSS3 is not part of HTML5 “But this is HTML5 Doctor” I imagine you saying “Why are you talking about CSS3 here?” Well I want to talk about a very specific part of CSS3 one that works in perfect tandem with HTML5 specifically with the new form functions that are available

One of the killer features that HTML5 introduces is…..