Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoke-UDJavascript Returns null Unexpectedly #4149

Open
parzog opened this issue Dec 16, 2024 · 0 comments
Open

Invoke-UDJavascript Returns null Unexpectedly #4149

parzog opened this issue Dec 16, 2024 · 0 comments
Labels
bug Something isn't working PowerShell Universal Issue relates to PowerShell Universal. requires triage Issue has not yet been verified by the development team. v5 Version 5 issue.

Comments

@parzog
Copy link

parzog commented Dec 16, 2024

Description of Issue

Reference forum post #11799 - When attempting to run Invoke-UDJavascript without user interaction to return a value (such as using window.localStorage.theme to retrieve the current user's dark/light mode selection) returns null instead of the value expected. The output is correct when ran with user interaction, such as the following:

New-UDApp -Content {
    New-UDButton -Text "h" -OnClick {
        Show-UDToast -Duration 10000 (Invoke-UDJavascript -Javascript "window.localStorage.theme")
    }
}

Version

5.0.15

Severity

Low

Hosting Method

IIS

Operating System

Windows

Database

SQLite

Licensed

Yes

Features

git push only

Additional Environment data

azure app proxy

Screenshots/Animations

No response

@parzog parzog added bug Something isn't working PowerShell Universal Issue relates to PowerShell Universal. requires triage Issue has not yet been verified by the development team. v5 Version 5 issue. labels Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working PowerShell Universal Issue relates to PowerShell Universal. requires triage Issue has not yet been verified by the development team. v5 Version 5 issue.
Projects
None yet
Development

No branches or pull requests

1 participant