w3c / performance-timeline

Performance Timeline
https://w3c.github.io/performance-timeline/
Other
111 stars 27 forks source link

Second example disconnects immediately which means nothing is delivered #15

Closed esprehn closed 9 years ago

esprehn commented 9 years ago

ex. https://w3c.github.io/performance-timeline/#h-introduction

has:

var observedEvents = [];
var observer = new PerformanceObserver(function(list) {
  observedEvents.push(list); // defer processing
});

// subscribe to Frame-Timing and User-Timing events
observer.observe({eventTypes: ['render', 'composite', 'mark', 'measure']});
observer.disconnect();
}

which disconnects immediately after observing which means you should get nothing delivered.

mpb commented 9 years ago

Better?