@ima/core
Version:
IMA.js framework for isomorphic javascript application
53 lines • 1.79 kB
TypeScript
import { PageHandler } from './PageHandler';
import { Dependencies } from '../../oc/ObjectContainer';
import { Window } from '../../window/Window';
import { ManagedPage, PageAction } from '../PageTypes';
export declare class PageNavigationHandler extends PageHandler {
#private;
protected _window: Window;
static $dependencies: Dependencies;
/**
* @param window The utility for manipulating the global context
* and global client-side-specific APIs.
*/
constructor(window: Window);
/**
* @inheritDoc
*/
init(): void;
/**
* @inheritDoc
*/
handlePreManagedState(managedPage: ManagedPage, nextManagedPage: ManagedPage, action: PageAction): void;
/**
* @inheritDoc
*/
handlePostManagedState(managedPage: ManagedPage, previousManagedPage: ManagedPage, action: PageAction): void;
/**
* Save user's scroll state to history.
*
* Replace scroll values in current state for actual scroll values in
* document.
*/
_saveScrollHistory(): void;
/**
* Scrolls to give coordinates on a page.
*/
_scrollTo({ x, y }: {
x?: number | undefined;
y?: number | undefined;
}): void;
/**
* Sets the provided URL to the browser's address bar by pushing or replacing a new
* state to the history.
*
* The state object pushed to or replaced in the history will be an object with the
* following structure: `{url: string}`. The `url` field will
* be set to the provided URL.
*
* @param url The URL.
* @param isRedirection If replaceState should be used instead of pushState.
*/
_setAddressBar(url: string, isRedirection: boolean): void;
}
//# sourceMappingURL=PageNavigationHandler.d.ts.map