Skip to main content

Bug Tracker

Side navigation

#6695 closed enhancement (wontfix)

Opened June 21, 2010 01:24AM UTC

Closed October 15, 2010 06:14PM UTC

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:
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 (1)
  • support.html5.js (1.6 KB) - added by stakach June 21, 2010 01:27AM UTC.

    Adds HTML5 feature detection to jQuery

Change History (3)

Changed August 09, 2010 02:17AM UTC by dmethvin comment:1

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.

Changed August 26, 2010 04:51PM UTC by paul.irish comment:2

Using something like Modernizr is going to be a more scalable solution for something like this.

http:/modernizr.com

Changed October 15, 2010 06:14PM UTC by dmethvin comment:3

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.