Webview Service
Learn more about the Webview Service
Introduction
Working with webviews can be managed with this service. We guess, you will love it.
Keep in mind, our WebviewService is only working with SPA (Single Page Application).
Setup
The only thing you should do, is set up the webview registry. The first argument is the path to your webview, second argument is the event name to change the route.
Available Methods
Here you can find all available methods if you get the webviewService instance.
getWebView()
routeTo(route: string, ...args: any[])
showCursor()
removeCursor()
removeAllCursors()
emit(eventName: string, ...args: any[])
on(eventName: string, listener: (...args: any[]) => void)
This method is not needed, The @OnGui() Decorator does the same, but for completeness it is listed here.
destroy()
focus()
unfocus()
Side notes
You can combine any method like a chain.
Last updated