@yesstudio/nuxt-composables
    Preparing search index...

    Function useSupported

    • Determines whether the browser supports a feature.

      Parameters

      • predicate: () => boolean

        The predicate to evaluate when determining support.

      Returns ComputedRef<boolean>

      A computed reference that indicates support.

      const supported = useSupported(() => window && 'IntersectionObserver' in window)

      watchEffect(() => {
      if (supported.value) {
      console.log('Browser feature supported')
      }
      })