AppUrlService
Class: AppUrlService
Section titled “Class: AppUrlService”Defined in: app-url.ts:173
Parses lapis:// app URLs and dispatches registered protocol handlers.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AppUrlService(
app):AppUrlService
Defined in: app-url.ts:176
Parameters
Section titled “Parameters”Returns
Section titled “Returns”AppUrlService
Methods
Section titled “Methods”dispatch()
Section titled “dispatch()”dispatch(
rawUrl):Promise<boolean>
Defined in: app-url.ts:270
Dispatch an app URL through the built-in open handler or a registered custom action.
Parameters
Section titled “Parameters”rawUrl
Section titled “rawUrl”string
Raw app URL to parse and execute.
Returns
Section titled “Returns”Promise<boolean>
true when the URL was handled successfully.
parse()
Section titled “parse()”parse(
rawUrl):ParsedAppUrl
Defined in: app-url.ts:211
Parse an app URL into its normalized action and parameter map.
Parameters
Section titled “Parameters”rawUrl
Section titled “rawUrl”string
Raw lapis://, lapis-notes://, or compatible app URL.
Returns
Section titled “Returns”ParsedAppUrl
The normalized URL request.
registerProtocolHandler()
Section titled “registerProtocolHandler()”registerProtocolHandler(
action,handler): () =>void
Defined in: app-url.ts:186
Register a handler for a custom app URL action.
Parameters
Section titled “Parameters”action
Section titled “action”string
Action name to match after the app URL scheme.
handler
Section titled “handler”AppUrlHandler
Callback invoked when a matching URL is dispatched.
Returns
Section titled “Returns”A cleanup function that unregisters the handler.
() => void