Webview:onThemeChange(isDark) event


This event is fired when Windows theme has changed.

Parameters

isDark

A boolean value that indicates if the new theme is "dark" or not.

Return value

The event returns no value.

Example

local ui = require "ui" require "webview" -- create a simple Webview local win = ui.Window("Webview.onThemeChange sample", 640, 480) local webview = ui.Webview(win, { url = "https://www.google.com" }) webview.align = "all" function webview:onThemeChange(isDark) self:reload() end ui.run(win):wait()