WebVitals

class WebVitals(val callback: (String, WebVitals.Metric, Long) -> Unit) : Plugin

A class providing Web Vitals functionality. When Web Vitals metrics are desired, this class adds JavaScript to the Portals web view to support measuring the performance of the web application.

Constructors

Link copied to clipboard
fun WebVitals(callback: (String, WebVitals.Metric, Long) -> Unit)

Types

Link copied to clipboard

Metrics supported by Portals Web Vitals.

Functions

Link copied to clipboard
open fun addListener(p0: PluginCall)
Link copied to clipboard
open fun checkPermissions(p0: PluginCall)
Link copied to clipboard
open fun execute(p0: Runnable)
Link copied to clipboard
fun fcp(portalName: String, time: Long)

First Contentful Paint (FCP)

Link copied to clipboard
fun fid(portalName: String, time: Long)

First Input Delay (FID)

Link copied to clipboard
open fun freeSavedCall()
Link copied to clipboard
Link copied to clipboard
open fun getAppId(): String
Link copied to clipboard
open fun getBridge(): Bridge
Link copied to clipboard
open fun getConfig(): PluginConfig
Link copied to clipboard
open fun getConfigValue(p0: String): Any
Link copied to clipboard
open fun getContext(): Context
Link copied to clipboard
open fun getPermissionState(p0: String): PermissionState
Link copied to clipboard
open fun getPermissionStates(): MutableMap<String, PermissionState>
Link copied to clipboard
open fun getPluginHandle(): PluginHandle
Link copied to clipboard
open fun getSavedCall(): PluginCall
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun load()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun removeAllListeners(p0: PluginCall)
Link copied to clipboard
open fun removeListener(p0: PluginCall)
Link copied to clipboard
open fun requestPermissions(p0: PluginCall)
Link copied to clipboard
open fun saveCall(p0: PluginCall)
Link copied to clipboard
open fun setBridge(p0: Bridge)
Link copied to clipboard
open fun setPluginHandle(p0: PluginHandle)
Link copied to clipboard
Link copied to clipboard
open fun startActivityForResult(p0: PluginCall, p1: Intent, p2: String)
Link copied to clipboard
fun ttfb(portalName: String, time: Long)

Time To First Byte (TTFB)

Properties

Link copied to clipboard

a callback to act on reported Web Vitals data

Link copied to clipboard
val js: <Error class: unknown class>

Web Vitals handler script. Built with the following: web-vitals@3.1.0 esbuild@0.15.18