Performance.onresourcetimingbufferfull

onresourcetimingbufferfull 属性是一个在resourcetimingbufferfull事件触发时会被调用的 event handler (en-US) 。这个事件当浏览器的资源时间性能缓冲区已满时会触发。

语法

callback = performance.onresourcetimingbufferfull = buffer_full_cb;

返回值

callback
一个当resourcetimingbufferfull 事件触发时调用的EventHandler (en-US)

例子

下面的示例在onresourcetimingbufferfull属性上设置一个回调函数。

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()">

规范

Specification Status Comment
Resource Timing Level 1
onresourcetimingbufferfull
Candidate Recommendation Initial definition.

浏览器兼容性

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help! (en-US)
Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support. (Yes)

-webkit (en-US)
46 (unprefixed)
57 (prefixed version removed)

(Yes) 未实现 未实现 未实现
Feature Android Webview Chrome for Android Firefox Mobile (Gecko) Firefox OS IE Phone Opera Mobile Safari Mobile
Basic support. (Yes)

-webkit (en-US)
46 (unprefixed)
57 (prefixed version removed)

(Yes)

-webkit (en-US)
46 (unprefixed)
57 (prefixed version removed)

(Yes) ? 未实现 (Yes) 未实现

参见