Performance: resourcetimingbufferfull event
The resourcetimingbufferfull
event is fired when the browser's resource timing buffer is full.
Syntax
Use the event name in methods like addEventListener()
, or set an event handler property.
addEventListener('resourcetimingbufferfull', event => { });
onresourcetimingbufferfull = event => { };
Event type
A generic Event
.
Examples
The following example sets a callback function on the onresourcetimingbufferfull
property.
function buffer_full(event) {
console.log("WARNING: Resource Timing Buffer is FULL!");
performance.setResourceTimingBufferSize(200);
}
function init() {
// Set a callback if the resource buffer becomes filled
performance.onresourcetimingbufferfull = buffer_full;
}
<body onload="init()">
Note that you could also set up the handler using the addEventListener() function:
performance.addEventListener('resourcetimingbufferfull', buffer_full);
Specifications
Specification |
---|
Resource Timing Level 2 # dom-performance-onresourcetimingbufferfull |
Browser compatibility
BCD tables only load in the browser