Skip to content

Commit 739fc28

Browse files
committed
Replace WICG spec links with html spec links
1 parent 794b71f commit 739fc28

File tree

2 files changed

+21
-23
lines changed

2 files changed

+21
-23
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![npm](https://img.shields.io/npm/v/navigation-api-types.svg?style=flat-square)](https://www.npmjs.com/package/navigation-api-types)
44

5-
Type definition for [`Navigation API`](https://github.com/WICG/navigation-api)
5+
Type definition for [`Navigation API`](https://developer.mozilla.org/en-US/docs/Web/API/Navigation_API)
66

77
### Install
88

index.d.ts

+20-22
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
// WICG Spec: https://github.com/WICG/navigation-api
21

3-
/** @see https://wicg.github.io/navigation-api/#navigation */
2+
/** @see https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigation */
43
interface Navigation extends EventTarget {
54
entries(): NavigationHistoryEntry[];
65
readonly currentEntry?: NavigationHistoryEntry;
@@ -35,17 +34,15 @@ interface NavigationEventMap {
3534
currententrychange: NavigationCurrentEntryChangeEvent;
3635
}
3736

38-
// https://wicg.github.io/navigation-api/#global
3937
declare const navigation: Navigation | undefined;
4038

4139
declare interface Window extends WindowNavigation {}
4240

43-
// https://wicg.github.io/navigation-api/#global
4441
declare interface WindowNavigation {
4542
readonly navigation?: Navigation;
4643
}
4744

48-
/** @see https://wicg.github.io/navigation-api/#navigateevent */
45+
/** @see https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigateevent */
4946
interface NavigateEvent extends Event {
5047
readonly navigationType: NavigationApiNavigationType;
5148
readonly destination: NavigationDestination;
@@ -57,6 +54,7 @@ interface NavigateEvent extends Event {
5754
readonly downloadRequest: string | null;
5855
readonly info: any;
5956
readonly hasUAVisualTransition: boolean;
57+
/** @see https://github.com/WICG/navigation-api/pull/264 */
6058
readonly sourceElement: Element | null;
6159

6260
intercept(options?: NavigationInterceptOptions): void;
@@ -68,7 +66,7 @@ declare var NavigateEvent: {
6866
new(type: string, eventInit: NavigateEventInit): Event;
6967
};
7068

71-
/** @see https://wicg.github.io/navigation-api/#dictdef-navigateeventinit */
69+
/** @see https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigateeventinit */
7270
interface NavigateEventInit extends EventInit {
7371
navigationType?: NavigationApiNavigationType;
7472
destination: NavigationDestination;
@@ -82,7 +80,7 @@ interface NavigateEventInit extends EventInit {
8280
hasUAVisualTransition?: boolean;
8381
}
8482

85-
/** @see https://wicg.github.io/navigation-api/#navigationcurrententrychangeevent */
83+
/** @see https://html.spec.whatwg.org/multipage/nav-history-apis.html#the-navigationcurrententrychangeevent-interface */
8684
interface NavigationCurrentEntryChangeEvent extends Event {
8785
readonly navigationType?: NavigationApiNavigationType;
8886
readonly from: NavigationHistoryEntry;
@@ -93,13 +91,13 @@ declare var NavigationCurrentEntryChangeEvent: {
9391
new(type: string, eventInit: NavigationCurrentEntryChangeEventInit): Event;
9492
};
9593

96-
/** @see https://wicg.github.io/navigation-api/#dictdef-navigationcurrententrychangeeventinit */
94+
/** @see https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigationcurrententrychangeeventinit */
9795
interface NavigationCurrentEntryChangeEventInit extends EventInit {
9896
navigationType?: NavigationApiNavigationType;
9997
destination: NavigationHistoryEntry;
10098
}
10199

102-
/** @see https://wicg.github.io/navigation-api/#navigationhistoryentry */
100+
/** @see https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigationhistoryentry */
103101
interface NavigationHistoryEntry extends EventTarget {
104102
readonly url: string | null;
105103
readonly key: string;
@@ -117,7 +115,7 @@ interface NavigationHistoryEntry extends EventTarget {
117115
removeEventListener(type: string, callback: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
118116
}
119117

120-
/** @see https://wicg.github.io/navigation-api/#navigationdestination */
118+
/** @see https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigationdestination */
121119
interface NavigationDestination {
122120
readonly url: string;
123121
readonly key: string | null;
@@ -128,59 +126,59 @@ interface NavigationDestination {
128126
getState(): any;
129127
}
130128

131-
/** @see https://wicg.github.io/navigation-api/#dictdef-navigationupdatecurrententryoptions */
129+
/** @see https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigationupdatecurrententryoptions */
132130
interface NavigationUpdateCurrentEntryOptions {
133131
state: any;
134132
}
135133

136-
/** @see https://wicg.github.io/navigation-api/#dictdef-navigationoptions */
134+
/** @see https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigationoptions */
137135
interface NavigationOptions {
138136
info?: any;
139137
}
140138

141-
/** @see https://wicg.github.io/navigation-api/#dictdef-navigationnavigateoptions */
139+
/** @see https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigationnavigateoptions */
142140
interface NavigationNavigateOptions extends NavigationOptions {
143141
state?: any;
144142
// Defaults to "auto"
145143
history?: NavigationHistoryBehavior;
146144
}
147145

148-
/** @see https://wicg.github.io/navigation-api/#dictdef-navigationreloadoptions */
146+
/** @see https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigationreloadoptions */
149147
interface NavigationReloadOptions extends NavigationOptions {
150148
state?: any;
151149
}
152150

153-
/** @see https://wicg.github.io/navigation-api/#navigationtransition */
151+
/** @see https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigationtransition */
154152
interface NavigationTransition {
155153
readonly navigationType: NavigationApiNavigationType;
156154
readonly from: NavigationHistoryEntry;
157155
readonly finished: Promise<void>;
158156
}
159157

160-
/** @see https://wicg.github.io/navigation-api/#dictdef-navigationresult */
158+
/** @see https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigationresult */
161159
interface NavigationResult {
162160
committed: Promise<NavigationHistoryEntry>;
163161
finished: Promise<NavigationHistoryEntry>;
164162
}
165163

166-
/** @see https://wicg.github.io/navigation-api/#dictdef-navigationinterceptoptions */
164+
/** @see https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigationinterceptoptions */
167165
interface NavigationInterceptOptions {
168166
handler?: NavigationInterceptHandler;
169167
focusReset?: NavigationFocusReset;
170168
scroll?: NavigationScrollBehavior;
171169
}
172170

173-
/** @see https://wicg.github.io/navigation-api/#enumdef-navigationtype */
171+
/** @see https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigationtype */
174172
type NavigationApiNavigationType = "reload" | "push" | "replace" | "traverse";
175173

176-
/** @see https://wicg.github.io/navigation-api/#enumdef-navigationhistorybehavior */
174+
/** @see https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigationhistorybehavior */
177175
type NavigationHistoryBehavior = "auto" | "push" | "replace";
178176

179-
/** @see https://wicg.github.io/navigation-api/#enumdef-navigationintercepthandler */
177+
/** @see https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigationintercepthandler */
180178
type NavigationInterceptHandler = () => Promise<void>;
181179

182-
/** @see https://wicg.github.io/navigation-api/#enumdef-navigationfocusreset */
180+
/** @see https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigationfocusreset */
183181
type NavigationFocusReset = "after-transition" | "manual";
184182

185-
/** @see https://wicg.github.io/navigation-api/#enumdef-navigationscrollbehavior */
183+
/** @see https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigationscrollbehavior */
186184
type NavigationScrollBehavior = "after-transition" | "manual";

0 commit comments

Comments
 (0)