Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML 5 + Progress element check?

This might be very basic, or not possible, but it's alluding me and worth asking. Is there a way to check if the html 5 progress element is supported in a browser?

var progress = document.createElement('progress');
like image 256
worked Avatar asked Apr 14 '13 00:04

worked


1 Answers

Another oneliner, taken from Modernizr:

//returns true if progress is enabled
var supportsProgress = (document.createElement('progress').max !== undefined);
like image 124
Sleavely Avatar answered Sep 22 '22 12:09

Sleavely