Web APIs
PerformanceObserver.supportedEntryTypes
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.supportedEntryTypesReturn Value
string[]
Supported entry type names.
Working Example
Example Snippetjavascript
(async () => {const types=PerformanceObserver.supportedEntryTypes;console.log(Array.isArray(types),typeof types.includes("longtask"));})()