News for hackers. Stuff that matters.
Re:Firefox supports supports, gets my support by MatthewPhillips on Monday August 06, 2012 @12:00PM (#4345694)
I meant to test of HTML5/CSS features are supported through JavaScript. For example, if I want to know if the browser supports <input type="number" /> it's not as easy as it should be.
Re:Firefox supports supports, gets my support by paulirish on Monday August 06, 2012 @01:08PM (#4346035)
Me too! When @supports was proposed I made sure to propose a JS API for the same functionality. David Baron liked the idea and it's now (mostly) in the spec: http://dev.w3.org/csswg/css3-conditional/#window-api

Right after @supports landed I got a bug filed for supportsCSS() https://bugzilla.mozilla.org/show_bug.cgi?id=779917 and a few days later an initial patch landed. So I think we're all set here.

Also on browser support: Opera already has an implementation in progress of @supports; we haven't seen patches yet from WebKit but there is definitely interest.

Re:Firefox supports supports, gets my support by eli on Monday August 06, 2012 @01:00PM (#4345991)
Fair enough. Though that's exactly what http://modernizr.com/ provides, no?

I realize nobody likes adding extra JS libraries, but if your only trying to access these properties from JS to begin with it doesn't seem like that big a deal.

Re:Firefox supports supports, gets my support by paulirish on Monday August 06, 2012 @01:11PM (#4346051)
It does, but since browsers have no defined API for this Modernizr deals with quite a few false positives. Putting the onus on browsers to accurately describe what features are present is good.

Plus it's always a good thing to kill off javascript libraries; we don't want to always keep sending JS down the wire when the platform should have this stuff by default.