Skip to content

Implement window.performance.timing #10428

Closed

Activity

  1. izgzhen commented on Apr 10, 2016

    @izgzhen
    Contributor

    Looks like we only have three readonly attributes unloadEventStart, loadEventStart and loadEventEnd left unimplemented. Is there already someone working on it? If not, I am interested in helping this out :)

    UPDATE: I was dazzled. Only six of 21 are implemented .....

  2. jdm commented on Apr 10, 2016

    @jdm
    Member

    Nobody's working on it, and I think #10452 is counting on using them, so this would be really useful :)

  3. added
    A-content/dom
    on Apr 10, 2016
  4. izgzhen commented on Apr 10, 2016

    @izgzhen
    Contributor

    @jdm Great. I believe investigation on this can help me understand the lifecycle better.

  5. added
    C-assigned
    on Apr 10, 2016
  6. izgzhen commented on Apr 12, 2016

    @izgzhen
    Contributor

    I found that current navigation_Start is counted as second but it should be millisecond according to spec.

    A DOMHighResTimeStamp should represent a time in milliseconds accurate to 5 microseconds

    Also, the previous implementation looks rather imprecise (i.e. time::get_time().sec * 1000;). I will improve it as well.

  7. izgzhen commented on Apr 12, 2016

    @izgzhen
    Contributor

    I bumped into an awkward problem here.

    I need to set the timing property of document after the load event targeting the window is completed. I didn't find any convenient way to register a callback function for completion of listener (which is also a callback function, though). Now the only solution I can come up with is hard coding here https://doc.servo.org/src/script/dom/eventtarget.rs.html#213 the logic to inspect the event type and target, then do something with the target. Anyway, I wonder if this can be done more sensibly?

    UPDATE: Discussion around this problem:

    Ms2ger "when the load event of the current document is completed" doesn't actually mean anything
    Manishearth that should just mean right after the event is fired I assume
    Manishearth because "load" handlers are executed sync
    Manishearth izgzhen: when you call let _ = wintarget.dispatch_event_with_target(document.upcast(), &event);, it runs the event handler inline

  8. added 3 commits that reference this issue on Apr 12, 2016
  9. timvandermeij commented on Apr 13, 2016

    @timvandermeij
    Contributor

    Fixed by #10538?

  10. izgzhen commented on Apr 13, 2016

    @izgzhen
    Contributor

    @timvandermeij The basic need is satisfied. But some other properties are still left unimplemented.

  11. kuoe0 commented on May 17, 2016

    @kuoe0
    Contributor

    Hi, I intent to try on this three attributes:

    • requestStart
    • responseStart
    • responseEnd

    Did anyone already work on them?

  12. jdm commented on May 17, 2016

    @jdm
    Member

    Those should be fine to work on. The response properties can probably be set in the ParserContext methods in servohtmlparser.rs, and the request can be noted in ScriptThread::start_page_load.

  13. nox commented on Jun 2, 2016

    @nox
    Contributor

    @kuoe0 Ping on this?

  14. kuoe0 commented on Jun 2, 2016

    @kuoe0
    Contributor

    Hi, I'm stiil working on this. I want to implement the 3 attributes I mentioned above. If you are interesting on this, there are many attributes haven't be implemented!

    2016年6月2日 21:35 於 Anthony Ramine [email protected] 寫道:

    @kuoe0 Ping on this?

    —
    You are receiving this because you were mentioned.
    Reply to this email directly, view it on GitHub, or mute the thread.

  15. added 3 commits that reference this issue on Jun 20, 2016
    40bc37d
    2164af8
    af73388
  16. added a commit that references this issue on Nov 3, 2016
    9b49f03
  17. jdm commented on Jan 27, 2017

    @jdm
    Member

    The most recent effort to implement this was in #11792. It looks like it was on the right track, but it needs to be rebased and update some expected test results.

  18. removed
    C-assigned
    on Jan 27, 2017
  19. nox commented on Apr 8, 2017

    @nox
    Contributor

    This was done.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-content/domA-network

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions