Skip to main content

Router

@akhaled01/voidDocs


@akhaled01/void / router / Router

Class: Router

The Router class to handle client-side routing and rendering of pages using a virtual DOM approach.

Constructors

new Router()

new Router(): Router

Initializes the Router instance, sets up event listeners, and extends HTMLElement and Document prototypes with custom event methods.

Returns

Router

Defined in

router.ts:24

Properties

currentVNode

currentVNode: VNode

Store the current virtual DOM node

Defined in

router.ts:16


pageContext

pageContext: RequireContext

Context for dynamic imports of page components

Defined in

router.ts:14


root

root: HTMLElement

The root element where pages will be rendered

Defined in

router.ts:12


stylesheetRef

stylesheetRef: HTMLLinkElement

Reference to the <link> element for stylesheets

Defined in

router.ts:18