You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 .....
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
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.
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!
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.
Activity
izgzhen commentedon Apr 10, 2016
Looks like we only have three readonly attributes
unloadEventStart,loadEventStartandloadEventEndleft 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 .....
jdm commentedon Apr 10, 2016
Nobody's working on it, and I think #10452 is counting on using them, so this would be really useful :)
izgzhen commentedon Apr 10, 2016
@jdm Great. I believe investigation on this can help me understand the lifecycle better.
izgzhen commentedon Apr 12, 2016
I found that current
navigation_Startis counted as second but it should be millisecond according to spec.Also, the previous implementation looks rather imprecise (i.e.
time::get_time().sec * 1000;). I will improve it as well.izgzhen commentedon Apr 12, 2016
I bumped into an awkward problem here.
I need to set the timing property of
documentafter theloadevent 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:
Auto merge of #10538 - izgzhen:performance_timing, r=KiChjang
Auto merge of #10538 - izgzhen:performance_timing, r=Ms2ger
Auto merge of #10538 - izgzhen:performance_timing, r=Ms2ger
timvandermeij commentedon Apr 13, 2016
Fixed by #10538?
izgzhen commentedon Apr 13, 2016
@timvandermeij The basic need is satisfied. But some other properties are still left unimplemented.
kuoe0 commentedon May 17, 2016
Hi, I intent to try on this three attributes:
Did anyone already work on them?
jdm commentedon May 17, 2016
Those should be fine to work on. The response properties can probably be set in the
ParserContextmethods in servohtmlparser.rs, and the request can be noted in ScriptThread::start_page_load.nox commentedon Jun 2, 2016
@kuoe0 Ping on this?
kuoe0 commentedon Jun 2, 2016
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.
Auto merge of #11792 - KuoE0:issue-10428, r=<try>
Auto merge of #11792 - KuoE0:issue-10428, r=<try>
Auto merge of #11792 - KuoE0:issue-10428, r=<try>
Auto merge of #11792 - KuoE0:issue-10428, r=<try>
jdm commentedon Jan 27, 2017
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.
nox commentedon Apr 8, 2017
This was done.
servo: Merge #10538 - Improve PerformanceTiming Interface (from izgzh…
servo: Merge #10538 - Improve PerformanceTiming Interface (from izgzh…
servo: Merge #10538 - Improve PerformanceTiming Interface (from izgzh…
servo: Merge #10538 - Improve PerformanceTiming Interface (from izgzh…