Ticket #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: | |
| Blocking: | Blocked by: |
Description
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
Change History
Changed 3 years ago by stakach
-
attachment
support.html5.js
added
comment:1 Changed 3 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.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Adds HTML5 feature detection to jQuery