- From: Ilya Grigorik <igrigorik@google.com>
- Date: Wed, 22 Oct 2014 14:49:36 -0700
- To: Eli Perelman <eperelman@mozilla.com>
- Cc: public-web-perf <public-web-perf@w3.org>, Joshua Peek <josh@joshpeek.com>
- Message-ID: <CADXXVKq+WOKZACOYEt=-9XPCHGg1Qo+DteZt3xh-W+EPPb3QVg@mail.gmail.com>
After some back and forth on GH, we've arrived at the following:
1) add "onentry" event handler to Performance interface
2) new PerformanceEntryEvent should be fired each time new event is added
to timeline (nav+resource timing, frame timing, etc)
- each PEE event contains an "entry" attribute, which points to the
source event
As a hands on example, this enables:
performance.addEventListener('entry', function(event) {
// process event: event.entry.name, event.entry.entryType, etc...
});
As a bonus, above behavior can be polyfilled, e.g...
var entry = performance.getEntriesByName('mark_fully_visible', 'mark');
var event = new PerformanceEntryEvent(entry);
performance.dispatchEvent(event);
----
Thoughts, comments?
ig
On Thu, Oct 16, 2014 at 2:19 PM, Ilya Grigorik <igrigorik@google.com> wrote:
> On Wed, Oct 15, 2014 at 7:35 AM, Eli Perelman <eperelman@mozilla.com>
> wrote:
>
>> Has anything actionable come from this thread yet? I certainly find value
>> in receiving events for performance entries and annotating them as well.
>>
>
> I think we reached rough consensus that it's a good idea... and we just
> need to draft and land the spec update.
>
> I've opened a tracking bug:
> https://github.com/w3c/performance-timeline/issues/1
>
> ig
>
>
>
>> On Fri, Feb 28, 2014 at 3:19 PM, Joshua Peek <josh@joshpeek.com> wrote:
>> >
>> > For user timings, we're already using a wrapper as you mentioned.
>> > However, I'd prefer to use the standard interface. Its also possible
>> > for libraries outside my control to set new marks that I'd like to
>> > report.
>> >
>> > New resource timing data is often outside of the user's control. New
>> > images and scripts can be appended dynamically.
>>
>
>
Received on Wednesday, 22 October 2014 21:50:57 UTC