feature.js
feature.js copied to clipboard
add Cookie enable check pls
thanks!
Why not create a PR?
on mootools it would be like this:
function cookieTest() {
var rnd=Number.random(1000000, 9999999);
var myCookie=Cookie.write('check', rnd);
var test=Cookie.read('check');
if ( typeOf(test)=='null' ) { // cookie off
return false;
}
if (rnd!=test) { // wrong cookie given
return false;
}
myCookie.dispose(); // rem
return true;
}
=)
I'm not sure that that is the purpose of this library. All the tests offered in this library correspond to the support of features, not if features are enabled or disabled.
I'm curious of @viljamis's thoughts on this one.