Webview object

The Webview widget displays and interacts with web content using Webview2

Event Description
Webview:onCreate() Event fired when Webview has just been created (but not initialized)
Webview:onFullScreenChange() Event fired when the web page ask for a fullscreen switch.
Webview:onHide() Event fired when Webview is hidden
Webview:onLoaded() Event fired when Webview widget has loaded the web page.
Webview:onMessage() Event fired when Webview widget has received a JSON message from the web page.
Webview:onReady() Event fired when Webview is initialized and ready to be used
Webview:onShow() Event fired when Webview is shown
Webview:onThemeChange() Event fired when the Windows theme has changed
Property Description Access Type
Webview.acceleratorkeys Enable/disable the Webview-specific accelerator keys readwrite boolean
Webview.align Align the Webview relative to its parent readwrite boolean
Webview.cangoback Check if the Webview can go to the previous page readonly boolean
Webview.cangoforward Check if the Webview can go to the next page readonly boolean
Webview.cdp Chrome DevTools Protocol access readwrite string
Webview.contextmenu Enable/disable the Webview context menu readwrite boolean
Webview.devtools Enable/disable the Webview developper tools readwrite boolean
Webview.enabled Enable/disable the Webview widget readwrite boolean
Webview.height Get/set the Webview's height readwrite number
Webview.parent Get the Webview's parent widget readonly
Webview.statusbar Enable/disable the Webview status bar readwrite boolean
Webview.title Get the title of the current web page readonly string
Webview.url Get/set the Webview actual URL readwrite string
Webview.useragent Get/set the current User Agent string readwrite string
Webview.visible Controls whether the Webview appears on screen readwrite boolean
Webview.width Get/set the Webview's width readwrite number
Webview.x Get/set the Webview's horizontal position readwrite number
Webview.y Get/set the Webview's vertical position readwrite number
Webview.zoom Get/set the current Webview zoom level readwrite number
Methods Description Return value
Webview:addinitscript() Add a script to be executed before page loading -
Webview:center() Centers the Webview on the parent widget -
Webview:constructor() Webview object constructor
Webview:eval() Evaluates a Javascript expression
Webview:goback() Go to the previous web page -
Webview:goforward() Go to the next page -
Webview:hide() Hides the Webview -
Webview:hostfromfolder() Maps a virtual hostname to a local folder boolean
Webview:loadstring() Load the specified HTML content as a new document boolean
Webview:opendevtools() Opens the Devtools window -
Webview:postmessage() Post a message to the toplevel document boolean
Webview:print() Prints the current web page
Webview:printPDF() Generates a PDF file from the current web page
Webview:reload() Reloads the current page -
Webview:restorehost() Restores a previously mapped virtual hostname boolean
Webview:show() Shows the Webview -
Webview:stop() Stops web page loading -