@@ -17,32 +17,58 @@ class NavigationTransition : public Bindings::PlatformObject {
1717 GC_DECLARE_ALLOCATOR (NavigationTransition);
1818
1919public:
20- [[nodiscard]] static GC::Ref<NavigationTransition> create (JS::Realm&, Bindings::NavigationType, GC::Ref<NavigationHistoryEntry>, GC::Ref<WebIDL::Promise>);
20+ [[nodiscard]] static GC::Ref<NavigationTransition> create (JS::Realm&, Bindings::NavigationType, GC::Ref<NavigationHistoryEntry>, GC::Ref<NavigationDestination>, GC::Ref< WebIDL::Promise>);
2121
2222 // https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigationtransition-navigationtype
23- Bindings::NavigationType navigation_type () const { return m_navigation_type; }
23+ Bindings::NavigationType navigation_type () const
24+ {
25+ // The navigationType getter steps are to return this's navigation type.
26+ return m_navigation_type;
27+ }
2428
2529 // https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigationtransition-from
26- GC::Ref<NavigationHistoryEntry> from () const { return m_from_entry; }
30+ GC::Ref<NavigationHistoryEntry> from () const
31+ {
32+ // The from getter steps are to return this's from entry.
33+ return m_from_entry;
34+ }
35+
36+ // https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigationtransition-to
37+ GC::Ref<NavigationDestination> to () const
38+ {
39+ // The to getter steps are to return this's destination.
40+ return m_destination;
41+ }
2742
2843 // https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigationtransition-finished
29- GC::Ref<WebIDL::Promise> finished () const { return m_finished_promise; }
44+ GC::Ref<WebIDL::Promise> finished () const
45+ {
46+ // The finished getter steps are to return this's finished promise.
47+ return m_finished_promise;
48+ }
3049
3150 virtual ~NavigationTransition () override ;
3251
3352private:
34- NavigationTransition (JS::Realm&, Bindings::NavigationType, GC::Ref<NavigationHistoryEntry>, GC::Ref<WebIDL::Promise>);
53+ NavigationTransition (JS::Realm&, Bindings::NavigationType, GC::Ref<NavigationHistoryEntry>, GC::Ref<NavigationDestination>, GC::Ref< WebIDL::Promise>);
3554
3655 virtual void initialize (JS::Realm&) override ;
3756 virtual void visit_edges (JS::Cell::Visitor&) override ;
3857
3958 // https://html.spec.whatwg.org/multipage/nav-history-apis.html#concept-navigationtransition-navigationtype
59+ // Each NavigationTransition has an associated navigation type, which is a NavigationType.
4060 Bindings::NavigationType m_navigation_type;
4161
4262 // https://html.spec.whatwg.org/multipage/nav-history-apis.html#concept-navigationtransition-from
63+ // Each NavigationTransition has an associated from entry, which is a NavigationHistoryEntry.
4364 GC::Ref<NavigationHistoryEntry> m_from_entry;
4465
66+ // https://html.spec.whatwg.org/multipage/nav-history-apis.html#concept-navigationtransition-destination
67+ // Each NavigationTransition has an associated destination, which is a NavigationDestination.
68+ GC::Ref<NavigationDestination> m_destination;
69+
4570 // https://html.spec.whatwg.org/multipage/nav-history-apis.html#concept-navigationtransition-finished
71+ // Each NavigationTransition has an associated finished promise, which is a promise.
4672 GC::Ref<WebIDL::Promise> m_finished_promise;
4773};
4874
0 commit comments