You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For non-synthetic NavigateEvents, the spec explicitly checks if there is an any related to any info/state and grabs it out of the incoming NavigationOptions
Let info be options["info"], if it exists; otherwise, undefined.
The navigationType, destination, canIntercept, userInitiated, hashChange, signal, formData, downloadRequest, info, and hasUAVisualTransition attributes must return the values they are initialized to.
If it's supposed to be implied that any info; creates an ECMAScript undefined value, then why do all of the places that look at NavigationOptions check for the existence of info in the dictionary first?
I agree the "initialized to" language is confusing and unorthodox. It would be nice if we had a more-rigorous way of doing that. But it's what every event interface does right now.
Let me know if I missed something and there's something very specific to NavigateEvent here, and I'll reopen.
For non-synthetic NavigateEvents, the spec explicitly checks if there is an
any
related to any info/state and grabs it out of the incomingNavigationOptions
Let info be options["info"], if it exists; otherwise, undefined.
However, for synthetic events, there's no actual initialization defined?
The NavigateEventInitData dictionary leaves the initial value not set:
The spec text for NavigateEvent just says that it has "the value it was initialized to"
https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigateevent-info
If it's supposed to be implied that
any info;
creates an ECMAScript undefined value, then why do all of the places that look at NavigationOptions check for the existence ofinfo
in the dictionary first?After chatting with @Lubrsi I think in order for the WPT test to be correct: https://github.com/web-platform-tests/wpt/blob/master/navigation-api/navigate-event/event-constructor.html#L95 there needs to be some spec language to initialize the
info
property toundefined
if it's not provided in theNavigateEventInitData
struct.cc @domenic
The text was updated successfully, but these errors were encountered: