Category Archives: Html5

Javascript: Understanding File interface

Questions: I’m getting started with Javascript and trying to understand some fundamentals. The questions is not specifically about File interface, but it is what I’m trying to figure out. In my HTML file I have a file type input. <input type=”file” id=”fileInput” multiple/> Then in my JS file I have: var fileVar = document.getElementById(‘fileInput’).files[0]; This… Read More »

What is the default quality for HTML5 Canvas.toDataURL?

Questions: According to mozilla, the second parameter for canvas.toDataURL(1,2) is: If the requested type is image/jpeg or image/webp, then the second argument, if it is between 0.0 and 1.0, is treated as indicating image quality; if the second argument is anything else, the default value for image quality is used. Other arguments are ignored. But… Read More »

Are there any javascript code (polyfill) available that enable Flexbox (2012, css3), like modernizr?

Questions: I’m looking for any javascript library that like modernizr (which actually does not) enables flexbox for “older browsers” (a polyfill). Yea I know this is a really new feature (infact “there aren’t” is a valid answer), but I’m hoping for something like this, I always have hard time with horizontal + vertical centering, this… Read More »

PhoneGap games, canvas and slow javascript

Questions: So I built what I hoped would become a simple android game. I first built a web version to getting it working ( then moved it to PhoneGap and used accelerometers to control the game. The only problem (and it’s a show stopping problem) is that the result is horrifically slow (updates i guess… Read More »

Poor Canvas2D performance with Firefox on Linux

Questions: I just hit something particularly hard to debug when doing some pretty intensive rendering with Canvas2D. I use all kinds of things, from globalCompositeOperation to multiple off-screen canvases, with some drawImage magic in-between. It works perfectly fine and smooth on : Chrome (26) [OSX 10.7.5] Safari (6.0.2) [OSX 10.7.5] Firefox (Both 18 and 20… Read More »

How to do Crash Reporting for Web Apps

Questions: When I develop iPhone / iPad apps I always use a crash reporting system. My current favorite is Crashlytics – which works great. For Android apps I’ve been using the rather more basic ACRA crash reporter. Now that I’m building a webapp to be run on a client’s own server, it seems a good… Read More »

How to draw doughnut with HTML5 canvas

Questions: I would like to draw doughnut within HTML5 canvas.If the background color of the canvas is a solid color, I was able to draw it. But it’s gradient color, I can’t draw it. I would like to know how to draw the doughnut, when the backgroud color of the canvas is gradient color. Like:… Read More »

HTML5 semantics: Where does the main content title belong?

Questions: Every time I create a HTML5 page, I struggle with where to put the main page title. Everybody seams to handle this differently… Here is the situation: Let’s say I have a website that is called “Meo’s frontend adventures”. On this site there is a page called “Abracadabra Semantics” with a sub title that… Read More »