Support
Check if a feature is supported in the current browser.
Usage
<script>
import {support} from "@sveu/browser"
const supported = support("clipboard")
</script>
<script>
import {support} from "@sveu/browser"
const supported = support("clipboard")
</script>
svelte
Example
Supported: false
<script>
import { support } from "@sveu/browser"
const supported = support("memory", "performance")
</script>
<h1 class="text-center">Supported: {$supported}</h1>
<script>
import { support } from "@sveu/browser"
const supported = support("memory", "performance")
</script>
<h1 class="text-center">Supported: {$supported}</h1>
svelte
1
2
3
4
5
6
7
8
Click fold/expand code
API
Arguments
Name | Description | Type | Required |
---|---|---|---|
feature | The feature to check for. | string | Yes |
from | The object to check for the feature in. | navigator , window , document or performance | No |