A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://developer.mozilla.org/en-US/docs/Web/API/PerformanceEventTiming/cancelable below:

PerformanceEventTiming: cancelable property - Web APIs

PerformanceEventTiming: cancelable property

Limited availability

The read-only cancelable property returns the associated event's cancelable property, indicating whether the event can be canceled.

Value

A boolean. true if the associated event is cancelable, false otherwise.

Examples Observing non-cancelable events

The cancelable property can be used when observing event-timing entries (PerformanceEventTiming). For example, to log and measure non-cancelable events only.

const observer = new PerformanceObserver((list) => {
  list.getEntries().forEach((entry) => {
    if (!entry.cancelable) {
      const delay = entry.processingStart - entry.startTime;
      console.log(entry.name, delay);
    }
  });
});

// Register the observer for events
observer.observe({ type: "event", buffered: true });
Specifications Browser compatibility

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4