Skip to content

Instantly share code, notes, and snippets.

Last active Sep 1, 2015
What would you like to do?
(function(w) {
if (!w || !("performance" in w) || !w.performance || !performance.getEntriesByName) {
BOOMR = w.BOOMR || {};
BOOMR.plugins = BOOMR.plugins || {};
BOOMR.plugins.WaitForMark = {
markFound: false,
init: function() {
var markName = "cav";
function poll() {
var entries = performance.getEntriesByName(markName);
if (entries.length == 0) {
return setTimeout(poll, 500);
done: function() {
this.markFound = true;
is_complete: function() {
return this.markFound === true;

This comment has been minimized.

Copy link

@bluesmoon bluesmoon commented Sep 1, 2015

Question: do they want to set page load time to when the mark fires, or is page load time still tied to onload and the mark is just measured as a custom timer? If the former, then you will have to update t_done to be the mark's time.


This comment has been minimized.

Copy link
Owner Author

@cvazac cvazac commented Sep 1, 2015

I went the custom timer route

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment