Example code for proposed HTML5 WebAPIs