Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 991 Bytes

+page.md

File metadata and controls

44 lines (30 loc) · 991 Bytes
title description
Support
Check if a feature is supported in the current browser.
<script> import Meta from "$components/meta.svelte" </script>

Check if a feature is supported in the current browser.

Usage

<script>
    import {support} from "@sveu/browser"

    const supported = support("clipboard")
</script>

Example

<script>
    import { support } from "@sveu/browser"


    const supported = support("memory", "performance")
</script>

<h1 class="text-center">Supported: {$supported}</h1>

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