Reputation: 93
If a browser don't support Blob(), make the body content "Sorry your browser isn't supported :(".
Is this a good way to do so?
try {
var isSupported = !! new Blob();
} catch (e) {
document.body.innerHTML = "<h1>Sorry your browser isn\'t supported :(</h1>";
}
Or you would suggest some other methods.
Upvotes: 0
Views: 105
Reputation: 6374
Here is another approach:
if (window.Blob === undefined) {
document.body.innerHTML = "<h1>Sorry your browser isn\'t supported :(</h1>";
}
Upvotes: 2