Category | Browser |
---|---|
Export Size | 536 B |
Last Changed | 2 months ago |
Observe performance metrics.
import { usePerformanceObserver } from '@vueuse/core' const entrys = ref<PerformanceEntry[]>([]) usePerformanceObserver({ entryTypes: ['paint'], }, (list) => { entrys.value = list.getEntries() })
export type UsePerformanceObserverOptions = PerformanceObserverInit & ConfigurableWindow & { /** * Start the observer immediate. * * @default true */ immediate?: boolean } /** * Observe performance metrics. * * @see https://vueuse.org/usePerformanceObserver * @param options */ export declare function usePerformanceObserver( options: UsePerformanceObserverOptions, callback: PerformanceObserverCallback ): { isSupported: ComputedRef<boolean> start: () => void stop: () => void }
© 2019-present Anthony Fu
Licensed under the MIT License.
https://vueuse.org/core/usePerformanceObserver/