Product: PowerShell Universal
Version: 5.0.15
I checked out post #5321 to try and find out a solution here, but basically I’m trying to pull the current theme variant (dark || light). The only place I can find this stored is localstorage, so logically my next step is to do this:
$CurrentMode = Invoke-UDJavascript -Javascript "window.localStorage.theme"
However, $CurrentMode
evaluates to ""
by the time it gets back to me. Testing in the browser console shows that running eval("window.localStorage.theme")
(pulled from the documentation here) does return 'dark'
or 'light'
accordingly; is there a way I can access this?
The exact use case is when defining custom components at a function level, I’m trying to vary the colors based on the theme/mode/variant/whatever determines dark or light. Basically.