HTMLElement: containerTimingIgnore property
HTML DOM
HTML DOM
The containerTimingIgnore property of the HTMLElement interface excludes the element and its descendants from contributing to the timing of any ancestor container root in the Container Timing API.
The containerTimingIgnore property reflects the value of the containertimingignore attribute.
Value
A boolean value.
Examples
Logging the value of containerTimingIgnore
In this example, adding the containertimingignore attribute to a div element excludes it from its ancestor container's timing.
<section containertiming="hero">
<div containertimingignore id="ignored">
<!-- ... -->
</div>
</section>
We can then read the property and log its value:
const el = document.getElementById("ignored");
console.log(el.containerTimingIgnore); // true
For examples of how to use the Container Timing API to get timing information, see PerformanceContainerTiming.
Specifications
Browser compatibility
See also
- PerformanceContainerTiming
containertimingignoreHTML attribute- HTMLElement.containerTiming