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
{{ message }}
Repository navigation
up.navigate() docs suggest I can omit the URL and use the main target, but that throws an error #268
I end up with what I presume is main target of body, because that gets augmented with up-source='/..../.
If I then try and use up.navigate() in the console, as a vague facsimile to window.location.reload() it errors like so:
> up.render() needs either { url, content, fragment, document } option
> Uncaught (in promise) up.Failed: up.render() needs either { url, content, fragment, document } option
at build (https://unpkg.com/unpoly@2.2.1/unpoly.js:2038:23)
at Object.fn [as failed] (https://unpkg.com/unpoly@2.2.1/unpoly.js:2047:27)
at Object.fail (https://unpkg.com/unpoly@2.2.1/unpoly.js:12079:24)
at Object.assertContentGiven (https://unpkg.com/unpoly@2.2.1/unpoly.js:8641:20)
at https://unpkg.com/unpoly@2.2.1/unpoly.js:13529:30
at Object.asyncify (https://unpkg.com/unpoly@2.2.1/unpoly.js:1585:36)
at https://unpkg.com/unpoly@2.2.1/unpoly.js:13515:18
at mockableFn (https://unpkg.com/unpoly@2.2.1/unpoly.js:22:36)
at https://unpkg.com/unpoly@2.2.1/unpoly.js:13579:16
at Object.mockableFn [as navigate] (https://unpkg.com/unpoly@2.2.1/unpoly.js:22:36)
>
which, I guess, makes sense. It needs a URL, same as the contract for up.visit(url). But the documentation (for 2.2) for up.navigate(target, options) says of targetIf omitted a main target will be rendered. Meanwhile, up.reload() works fine for the purposes of refreshing the body fragment (the main target?), but didn't achieve the results I was hoping for because the <title>...</title> doesn't get updated (I guess because it doesn't count as a navigation option, hence the dive into navigate()
(Edit: immediately after opening this I note that I can just use up.reload({navigate: true}) for my purposes, but I think issue around navigate without a target may still be relevant)
Activity