mirror of
https://github.com/servo/servo.git
synced 2025-08-14 01:45:33 +01:00
Auto merge of #23203 - iulianR:22828, r=jdm
Implement PerformanceNavigation interface <!-- Please describe your changes on the following line: --> This is my first attempt. Please let me know if I should change anything. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #22828 (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because **not sure** <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23203) <!-- Reviewable:end -->
This commit is contained in:
commit
005320c08c
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