mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Implement PerformanceNavigation interface
This commit is contained in:
parent
e100af57a5
commit
62f0785c2c
19 changed files with 411 additions and 69 deletions
|
@ -49,3 +49,8 @@ partial interface Performance {
|
|||
partial interface Performance {
|
||||
PerformanceNavigationTiming timing();
|
||||
};
|
||||
// https://w3c.github.io/navigation-timing/#extensions-to-the-performance-interface
|
||||
partial interface Performance {
|
||||
[SameObject, Exposed=Window]
|
||||
readonly attribute PerformanceNavigation navigation;
|
||||
};
|
||||
|
|
18
components/script/dom/webidls/PerformanceNavigation.webidl
Normal file
18
components/script/dom/webidls/PerformanceNavigation.webidl
Normal file
|
@ -0,0 +1,18 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
/*
|
||||
* The origin of this IDL file is
|
||||
* https://w3c.github.io/navigation-timing/#the-performancenavigation-interface
|
||||
*/
|
||||
|
||||
[Exposed=Window]
|
||||
interface PerformanceNavigation {
|
||||
const unsigned short TYPE_NAVIGATE = 0;
|
||||
const unsigned short TYPE_RELOAD = 1;
|
||||
const unsigned short TYPE_BACK_FORWARD = 2;
|
||||
const unsigned short TYPE_RESERVED = 255;
|
||||
readonly attribute unsigned short type;
|
||||
readonly attribute unsigned short redirectCount;
|
||||
// [Default] object toJSON();
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue