HTML5 Feature Detection: Presence vs Behaviour: Revision history

From PiRho Knowledgebase
Jump to navigationJump to search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

12 July 2026

  • curprev 20:0620:06, 12 July 2026 Dex talk contribs 7,083 bytes +7,083 Created page with "Most HTML5 feature detection articles get it wrong. The classic approach was: <syntaxhighlight lang="javascript"> if(document.createElement("canvas").getContext) { // Canvas supported } </syntaxhighlight> Or even worse: <syntaxhighlight lang="javascript"> if(window.localStorage) { // LocalStorage supported } </syntaxhighlight> The problem is that these tests only prove that an API exists. They do '''not''' prove that it is functional. A browser may: * Expo..."