Posts about HTML 5

Breaking out of iframe

May 13th 2022 HTML 5

Iframes are much less common today than they used to be. But there are still use cases where they make sense, such as when embedding a payment provider's form in a web application. This allows you to maintain a common header and footer even when the user interacts with the payment provider's page.

Flexbox Relative Height Issue in iOS 10

February 9th 2018 HTML 5 Ionic 2/3

Flexbox greatly simplifies many HTML layout scenarios. Although it is already broadly supported in browsers, sometimes incomplete implementations can still make your life difficult. For example, in version 10 of iOS Safari, height of flexbox children isn't treated as explicitly set when defined by the parent flex container.

Detecting Camera Permission Dialog in Browser

September 1st 2017 HTML 5 JavaScript Web Analytics

When trying to capture camera video from browser using MediaDevices.getUserMedia, user consent is required. On first call the browser will show a dialog to the user who can either allow or block access to the camera. It might be useful to have some analytical data for your application on how many users blocked the camera access, but unfortunately there's no direct way to detect from code when the dialog was shown and how the user answered.

Render Captured Video to Full Page Canvas

March 17th 2017 HTML 5 JavaScript

In modern HTML 5 browsers you can render video from your camera inside a web page using the video element. However, to further process the captured video or add some custom rendering on top of it, the canvas element needs to be used. Due to the ever changing APIs in this field, it's not easy to find up-to-date working sample code for achieving this.