MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / safeWriteNavState

Method safeWriteNavState

core/src/components/router/router.tsx:289–307  ·  view source on GitHub ↗
(
    node: HTMLElement | undefined,
    chain: RouteChain,
    direction: RouterDirection,
    segments: string[],
    redirectFrom: string[] | null,
    index = 0,
    animation?: AnimationBuilder
  )

Source from the content-addressed store, hash-verified

287 }
288
289 private async safeWriteNavState(
290 node: HTMLElement | undefined,
291 chain: RouteChain,
292 direction: RouterDirection,
293 segments: string[],
294 redirectFrom: string[] | null,
295 index = 0,
296 animation?: AnimationBuilder
297 ): Promise<boolean> {
298 const unlock = await this.lock();
299 let changed = false;
300 try {
301 changed = await this.writeNavState(node, chain, direction, segments, redirectFrom, index, animation);
302 } catch (e) {
303 printIonError('[ion-router] - Exception in safeWriteNavState:', e);
304 }
305 unlock();
306 return changed;
307 }
308
309 private async lock() {
310 const p = this.waitPromise;

Callers 2

navChangedMethod · 0.95
writeNavStateRootMethod · 0.95

Calls 3

lockMethod · 0.95
writeNavStateMethod · 0.95
printIonErrorFunction · 0.90

Tested by

no test coverage detected