Bug Tracker

Opened 13 years ago

Closed 12 years ago

#6695 closed enhancement (wontfix)

jQuery.support Update

Reported by: stakach Owned by:
Priority: undecided Milestone: 1.4.3
Component: support Version: 1.4.2
Keywords: html5 feature detection Cc:
Blocked by: Blocking:


Please add some of the HTML5 features to jQuery Support:

$.extend($.support, {

files: typeof FileReader != 'undefined', cache: !!window.applicationCache, webdb: !!window.openDatabase, geolocation: !!navigator.geolocation, history: !!(window.history && window.history.pushState && window.history.popState), messaging: !!window.postMessage, microdata: !!document.getItems, serverSentEvents: typeof EventSource != 'undefined', localStorage: !!window.localStorage, undo: typeof UndoManager != 'undefined', websockets: !!window.WebSocket, webWorker: !!window.Worker


Tests for support for the HTML5 File API (http://dev.w3.org/2006/webapi/FileAPI/) Tests for cache manifest support (http://www.w3.org/TR/html5/offline.html#appcache) Tests for webSQLDatabase support (http://dev.w3.org/html5/webdatabase/) Tests for HTML5 geolocation support (http://www.w3.org/TR/geolocation-API/) Tests for joint session history support (http://www.w3.org/TR/2009/WD-html5-20090825/history.html) Tests for cross-document messaging support (http://dev.w3.org/html5/postmsg/) Tests for microdata support (http://www.w3.org/TR/html5/microdata.html) Tests for server-sent event support (http://dev.w3.org/html5/eventsource/) Tests for local storage support (http://dev.w3.org/html5/webstorage/#the-localstorage-attribute) Tests for undo management support (http://www.w3.org/TR/2008/WD-html5-20080122/#undo) Tests for WebSocket support (http://www.w3.org/TR/websockets/) Tests for Web Worker support (http://dev.w3.org/html5/workers/)

Attachments (1)

support.html5.js (1.6 KB) - added by stakach 13 years ago.
Adds HTML5 feature detection to jQuery

Download all attachments as: .zip

Change History (4)

Changed 13 years ago by stakach

Attachment: support.html5.js added

Adds HTML5 feature detection to jQuery

comment:1 Changed 12 years ago by dmethvin

We should weigh the cost of running this code on every page; right now nearly all the jQuery.support properties are used by core itself.

comment:2 Changed 12 years ago by paul.irish

Using something like Modernizr is going to be a more scalable solution for something like this. http:/modernizr.com

comment:3 Changed 12 years ago by dmethvin

Priority: undecided
Resolution: wontfix
Status: newclosed

Per the docs for jQuery.support, none of these feature tests belong in core unless jQuery core itself needs them. Modernizr is a better general solution.

Note: See TracTickets for help on using tickets.