Skip to content

Commit

Permalink
feat: check for blob and url support
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarlorentzon committed Jun 4, 2018
1 parent f6dfbc2 commit d4ba90c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Support.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export function isSupported(): boolean {
*/
export function isFallbackSupported(): boolean {
return support.isBrowser() &&
support.isBlobSupported() &&
support.isArraySupported() &&
support.isFunctionSupported() &&
support.isJSONSupported() &&
Expand Down
4 changes: 4 additions & 0 deletions src/utils/Support.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ export function isObjectSupported(): boolean {
);
}

export function isBlobSupported(): boolean {
return "Blob" in window && "URL" in window;
}

let isWebGLSupportedCache: boolean = undefined;
export function isWebGLSupportedCached(): boolean {
if (isWebGLSupportedCache === undefined) {
Expand Down

0 comments on commit d4ba90c

Please sign in to comment.