mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Implement PerformanceNavigation interface
This commit is contained in:
parent
e100af57a5
commit
62f0785c2c
19 changed files with 411 additions and 69 deletions
|
@ -19,6 +19,7 @@ use crate::dom::globalscope::GlobalScope;
|
|||
use crate::dom::performanceentry::PerformanceEntry;
|
||||
use crate::dom::performancemark::PerformanceMark;
|
||||
use crate::dom::performancemeasure::PerformanceMeasure;
|
||||
use crate::dom::performancenavigation::PerformanceNavigation;
|
||||
use crate::dom::performancenavigationtiming::PerformanceNavigationTiming;
|
||||
use crate::dom::performanceobserver::PerformanceObserver as DOMPerformanceObserver;
|
||||
use crate::dom::window::Window;
|
||||
|
@ -372,6 +373,11 @@ impl PerformanceMethods for Performance {
|
|||
unreachable!("Are we trying to expose Performance.timing in workers?");
|
||||
}
|
||||
|
||||
// https://w3c.github.io/navigation-timing/#dom-performance-navigation
|
||||
fn Navigation(&self) -> DomRoot<PerformanceNavigation> {
|
||||
PerformanceNavigation::new(&self.global())
|
||||
}
|
||||
|
||||
// https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/HighResolutionTime/Overview.html#dom-performance-now
|
||||
fn Now(&self) -> DOMHighResTimeStamp {
|
||||
Finite::wrap(self.now())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue