{"_id":"57b557f0d3092517007cfaca","category":{"_id":"57b557f0d3092517007cfac4","project":"54523fec04160008005b1cc8","__v":0,"version":"57b557f0d3092517007cfac3","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-11-13T07:05:09.147Z","from_sync":false,"order":0,"slug":"rollmyfile-javascript-api","title":"rollMyFile JavaScript API"},"version":{"_id":"57b557f0d3092517007cfac3","project":"54523fec04160008005b1cc8","__v":2,"createdAt":"2016-08-18T06:38:40.018Z","releaseDate":"2016-08-18T06:38:40.018Z","categories":["57b557f0d3092517007cfac4","57b557f0d3092517007cfac5","59c4d73c5237e3003c4532c3"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2.0"},"__v":0,"project":"54523fec04160008005b1cc8","user":"54523f0604160008005b1cc0","parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2014-11-17T17:03:13.840Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"auth":"never","params":[],"url":""},"isReference":false,"order":4,"body":"Checks the specified extension and returns **True**, if files with this extension can be open online with rollMyFile API.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"if (rollMyFile.isExtensionSupported('.vsd')) {\\n  // Activate \\\"open online\\\" button for .vsd file\\n}\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Performance Tip\",\n  \"body\": \"This method would give better performance that straightforward looking for an extension in the list returned by *getSupportedExtensions*.\"\n}\n[/block]","excerpt":"","slug":"isextensionsupportedextension","type":"fn","title":"isExtensionSupported(extension)"}

isExtensionSupported(extension)


Checks the specified extension and returns **True**, if files with this extension can be open online with rollMyFile API. [block:code] { "codes": [ { "code": "if (rollMyFile.isExtensionSupported('.vsd')) {\n // Activate \"open online\" button for .vsd file\n}", "language": "javascript" } ] } [/block] [block:callout] { "type": "info", "title": "Performance Tip", "body": "This method would give better performance that straightforward looking for an extension in the list returned by *getSupportedExtensions*." } [/block]