Web APIs

PerformanceObserver.supportedEntryTypes

Try the free JavaScript compiler

Lists entry types supported by this observer implementation. A type appearing in the list is not a promise that any particular event will occur.

Formal Syntax & Structure

javascript syntaxjavascript
PerformanceObserver.supportedEntryTypes

Return Value

string[]

Supported entry type names.

Working Example

Example Snippetjavascript
(async () => {const types=PerformanceObserver.supportedEntryTypes;console.log(Array.isArray(types),typeof types.includes("longtask"));})()
JavaScript Reference