Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/global-EventCounts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
id: global-EventCounts
title: EventCounts 🧪
---

import ExperimentalAPIWarning from './\_experimental-api-warning.mdx';

<ExperimentalAPIWarning />

The global [`EventCounts`](https://developer.mozilla.org/en-US/docs/Web/API/EventCounts) class, as defined in Web specifications.
10 changes: 10 additions & 0 deletions docs/global-PerformanceEntry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
id: global-PerformanceEntry
title: PerformanceEntry 🧪
---

import ExperimentalAPIWarning from './\_experimental-api-warning.mdx';

<ExperimentalAPIWarning />

The global [`PerformanceEntry`](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceEntry) class, as defined in Web specifications.
14 changes: 14 additions & 0 deletions docs/global-PerformanceEventTiming.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
id: global-PerformanceEventTiming
title: PerformanceEventTiming 🧪
---

import ExperimentalAPIWarning from './\_experimental-api-warning.mdx';

<ExperimentalAPIWarning />

The global [`PerformanceEventTiming`](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceEventTiming) class, as defined in Web specifications.

:::info Partial support
The `cancelable` and `target` properties are not supported yet.
:::
14 changes: 14 additions & 0 deletions docs/global-PerformanceLongTaskTiming.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
id: global-PerformanceLongTaskTiming
title: PerformanceLongTaskTiming 🧪
---

import ExperimentalAPIWarning from './\_experimental-api-warning.mdx';

<ExperimentalAPIWarning />

The global [`PerformanceLongTaskTiming`](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceLongTaskTiming) class, as defined in Web specifications.

:::info Partial support
The value for the `attribution` property is always an empty array.
:::
10 changes: 10 additions & 0 deletions docs/global-PerformanceMark.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
id: global-PerformanceMark
title: PerformanceMark 🧪
---

import ExperimentalAPIWarning from './\_experimental-api-warning.mdx';

<ExperimentalAPIWarning />

The global [`PerformanceMark`](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceMark) class, as defined in Web specifications.
10 changes: 10 additions & 0 deletions docs/global-PerformanceMeasure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
id: global-PerformanceMeasure
title: PerformanceMeasure 🧪
---

import ExperimentalAPIWarning from './\_experimental-api-warning.mdx';

<ExperimentalAPIWarning />

The global [`PerformanceMeasure`](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceMeasure) class, as defined in Web specifications.
62 changes: 62 additions & 0 deletions docs/global-PerformanceObserver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
id: global-PerformanceObserver
title: PerformanceObserver 🧪
---

import ExperimentalAPIWarning from './\_experimental-api-warning.mdx';

<ExperimentalAPIWarning />

The global [`PerformanceObserver`](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver) class, as defined in Web specifications.

## Example

```ts
const observer = new PerformanceObserver(
(list, observer, options) => {
for (const entry of list.getEntries()) {
console.log(
'Received entry with type',
entry.entryType,
'and name',
entry.name,
'that started at',
entry.startTime,
'and took',
entry.duration,
'ms',
);
}
},
);

observer.observe({entryTypes: ['mark', 'measure']});
```

---

# Reference

## Constructor

### `PerformanceObserver()`

See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver/PerformanceObserver).

## Static properties

### `supportedEntryTypes`

See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver/supportedEntryTypes).

Returns `['mark', 'measure', 'event', 'longtask']`.

## Instance methods

### `observe()`

See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver/observe).

### `disconnect()`

See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver/disconnect).
10 changes: 10 additions & 0 deletions docs/global-PerformanceObserverEntryList.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
id: global-PerformanceObserverEntryList
title: PerformanceObserverEntryList 🧪
---

import ExperimentalAPIWarning from './\_experimental-api-warning.mdx';

<ExperimentalAPIWarning />

The global [`PerformanceObserverEntryList`](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserverEntryList) class, as defined in Web specifications.
89 changes: 85 additions & 4 deletions docs/global-performance.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,91 @@
---
id: global-performance
title: performance
title: performance 🧪
---

:::warning
🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/performance) for more information.
import ExperimentalAPIWarning from './\_experimental-api-warning.mdx';

<ExperimentalAPIWarning />

The global [`performance`](https://developer.mozilla.org/en-US/docs/Web/API/Window/performance) object, as defined in Web specifications.

---

# Reference

## Instance properties

### `eventCounts`

See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/Performance/eventCounts).

### `memory`

See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/Performance/memory).

### `rnStartupTiming` ⚠️

:::warning Non-standard
This is a React Native specific extension.
:::

Provides information about the startup time of the application.

```ts
get rnStartupTiming(): ReactNativeStartupTiming;
```

The `ReactNativeStartupTiming` interface provides the following fields:

| Name | Type | Description |
| ---------------------------------------- | -------------- | --------------------------------------------------------- |
| `startTime` | number \| void | When the application startup was started. |
| `initializeRuntimeStart` | number \| void | When the React Native runtime initialization was started. |
| `executeJavaScriptBundleEntryPointStart` | number \| void | When the execution of the application bundle was started. |
| `endTime` | number \| void | When the React Native runtime was fully initialized. |

### `timeOrigin`

:::info Partial support
Provides the number of milliseconds from the Unix epoch until system boot, instead of the number of milliseconds from the Unix epoch until app startup.
:::

See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/Performance/timeOrigin).

## Instance methods

### `clearMarks()`

See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/Performance/clearMarks).

### `clearMeasures()`

See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/Performance/clearMeasures).

### `getEntries()`

See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/Performance/getEntries).

### `getEntriesByName()`

See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/Performance/getEntriesByName).

### `getEntriesByType()`

See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/Performance/getEntriesByType).

### `mark()`

See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/Performance/mark).

### `measure()`

See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure).

### `now()`

:::info Partial support
Provides the number of milliseconds from system boot, instead of the number of milliseconds from app startup.
:::

The global `performance` object, as defined in Web specifications.
See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/Performance/now).
8 changes: 8 additions & 0 deletions website/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ export default {
'global-clearInterval',
'global-clearTimeout',
'global-console',
'global-EventCounts',
'global-fetch',
'global-File',
'global-FileReader',
Expand All @@ -244,6 +245,13 @@ export default {
'global-Headers',
'global-navigator',
'global-performance',
'global-PerformanceEntry',
'global-PerformanceEventTiming',
'global-PerformanceLongTaskTiming',
'global-PerformanceMark',
'global-PerformanceMeasure',
'global-PerformanceObserver',
'global-PerformanceObserverEntryList',
'global-process',
'global-queueMicrotask',
'global-Request',
Expand Down
Loading