html5

Quality of code improvements.

Hi, This is more of a improvement and suggestions question than one clear defined answer. I have been working on the website for Naked CSS Day 2011 for a bit and was wondering if anyone had any suggestions on my code quality/efficiency. In the spirit of the event I am attempting to bring everything into in the purest and cleanest form of...

What events does an <input type="number" /> fire when it's value is changed?

Just wondering whether anyone knows what events an HTML5 <input type="number" /> element fires when it's up / down arrows are clicked: I'm already using an onblur for when the focus leaves the input field. ...

font-size percentage with respect to container

how to change font-size with respect to its container. <div id="container" style="width: 100%; height: 100%; border: 1px solid #ff0"> <span style="font-size: 18px">Test</span> </div> Now if i resize my window the container is also resized but the font-size remain of fix size, i want to change the font-size according to its contain...

iOS4 Media Control Javascript Events?

I'm not sure if this is exactly what I'm looking for, but I've noticed the iOS4 media controls (double tap home button and slide left to see them) have some control over the HTML5 Audio elements, but is there any way to do a callback for previous and next songs? if so does anyone know the way I can tap into these callbacks? :) Thanks ...

How to use h1 to h6 within header, section, article, etc.. in html5?

In xhtml 1.0 hn (h1 to h6) must represent document structure, like chapters in a book, and they all descend from the body. In html5 there are section, article, header, hgroup, and it seems that hn tags descend from one of these tags, and then are not relative to the body element. like <html> <body> <h1>My personal homepage</h1> <sectio...

How to understand CSS3 3D Transform Perspective

I am testing CSS3 3D Transform in Safari, but I found that the 3D model is far from my knowledge. After consulting the Holy W3C Document, i discovered all transform rules in CSS3 will be translated to transform matrix which is similar to the one used in SVG standards : http://www.w3.org/TR/SVG/coords.html#TranslationDefined OMG, I am no...

How to export (dump) WebSQL data

I'm working on a Chrome Extension that uses WebSQL to store historical data. Being WebSQL, the DB is stored on the client. I'd like to add an option to export/import such data so that the user can share/use this data with other users, or with other PCs. These are my first steps on a client-only database, so I wonder how to do this. I ...

Can my HTML5 canvas effects run on iPhone or Android?

I design a HTML5 canvas effects homepage on my site http://catfan.me You can click the sky and add a cloud, and It`s able to show the fps. It runs perfect on HTML5 supported browser, such as Chrome, FireFox, Safari, IE9.. But i do not know if it run on iPhone, iPad or Android mobile phone. I didn`t have this devices. Can anyone to he...

Firefox 4.06b IndexedDB support

Is it possible to access the IndexedDB API in Firefox 4.0b6? If so, how? window.indexedDB is not defined. Currently working off of this example: http://hacks.mozilla.org/category/indexeddb/as/complete/ ...

whats is the best way of dealing with php audio and webcam?

is thier a guideline of how i can deal with playing around with audios and recording webcams, and what file formats i should use for optimisation, and plus any poplaur modules, plugins and classes that i can use to prevent re-inventing the wheel. im really looking at using this kind of stuff for user generated content. basically im looki...

Is it a good idea to use HTML5 now?

I know it will be 'finalized/made official' in 2012 (and something to do with it being given 'Recommendation status' in 2022), but I'm wondering if it's a good idea to make a site using HTML5 now. A simple portfolio sorta site? Given that most users (most people using IE) won't have support for it, although IE9 (shock) will be shipping ...

Why is putImageData so slow?

I am working with a relatively large Canvas where various (complex) stuff is drawn to. I then want to save the Canvas' state, so I can quickly reset it to the state it now is at a later point. I use getImageData for this and store the data in a variable. I then draw some more stuff to the canvas and will later reset the Canvas to where i...

Rotation of div containing html5 elemets (e.g. SVG, canvas) in ie9 doesn't show div properly

I've tried using the filter attribute to rotate a div, this works well until the div is comprised of an SVG element, which results in a rotated div with the SVG not being shown (with the exception of images). e.g. style="filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.86602540, M12=0.50000000, M21=-0.50000000,M22=0.86602540,sizin...

Detecting shape coordinates in Canvas

I'm writing drag & drop functionality in my HTML5 Canvas application and am wondering how to detect if I'm clicking on a shape other than a rectangle or square, in which case I would do something like this inside of my 'mousedown' event handler: if (evt._x > 13 && evt._x < 202 .... ) {} I don't see how to easily do something like that...

Do web workers terminate when the user navigates to a new page (within the same application)

For example, can i offload a task and allow the user to keep surfing my site whilst the javascript runs? It seems if I navigate away from the page, the worker terminates. ...

HTML 5 Cache Manifest Vs. Etags, Expires or cache-control header

Can someone explain to me how HTML 5's cache manifest differs from using other file header techniques for telling the browser to cache the file? ...

How can I open a link in a new tab when the user clicks it

I Would prefer not to use javascript if that's possible but a jquery solution would be fine too. I'd appreciate any help. ...

*resumable * html5 drag-drop file uploads

I'd like to know if it's possible/advisable to build the following JPG uploader: - use html5 drag-drop to select files for upload - filter drop list to upload JPG files only - use html5 to save upload list in local storage - initiate html5 file uploads And in case the uploads did not successfully complete, on reload of page: - check loc...

Is there any problem with using HTML5's "data-*" attributes for older browsers?

I want to associate some custom data with some HTML nodes. I was going to use the new HTML5 style 'data-*' attributes. e.g.: <tr class="foo" data-typeid="7">…, and then I was going to select this HTML node and show/hide it etc. by reading the value with $(node).attr("data-typeid"). However this web page needs to work with older browsers...

Unpack BinaryString sent from JavaScript FileReader API to Python

I'm trying to unpack a binary string sent via Javascript's FileReader readAsBinaryString method in my python app. It seems I could use the struct module for this. I'm unsure what to provide as as the format for the unpack exactly. Can someone confirm this is the right approach, and if so, what format I should specify? According to th...