sparkling-navigation
Router helper APIs for opening/closing Sparkling pages from Lynx/JS.
Install
Exports
open(params, callback)
Open a page/route by scheme.
- Request:
{ scheme: string; options?: OpenOptions } - Response:
{ code: number; msg: string }
Example:
OpenOptions:
interceptor?: stringextra?: object
close(params?, callback?)
Close the current page (or a specific container by ID).
Example:
navigate(params, callback)
Build a hybrid://... scheme from a bundle path and optional params, then open it.
- Request:
{ path: string; options?: NavigateOptions; baseScheme?: string } pathmust be a relative bundle path, e.g.main.lynx.bundle(not a full scheme).baseSchemedefaults tohybrid://lynxview_pagein the implementation.
Example:
NavigateOptions:
params?: object– query params merged into the schemereplace?: booleanreplaceType?: 'alwaysCloseAfterOpen' | 'alwaysCloseBeforeOpen' | 'onlyCloseAfterOpenSucceed'interceptor?: stringextra?: object
See also:
- sparkling-method – underlying pipe SDK

