Skip to content

Conversation

@NSTechBytes
Copy link
Owner

No description provided.

NSTechBytes and others added 22 commits December 7, 2025 07:51
Added isCreationInProgress boolean and onFinishAction and onPageLoadAction
Added OnFinishAction and OnPageLoadAction handling and fixed a race condition when creating WebView by using the new isCreationInProgress boolean.
Added checks to prevent multiple creation attempts of WebView2 environment and controller. 
Removed unnecessary global meter and redraw bangs. 
Changed Initialized notice to debug.
Added onPageLoadAction and onFinishAction.
Re-ordered creation check
added check for initialization
added missing reset when hr fails.
Removed redundant redraw calls after callback completion.
This was causing CallJS to execute twice..
Ok, here's my attempt to solve the sync issue.

Unfortunately, all my attempts to add a similar solution for window.OnInitialize and CallJS failed, both create a deadlock when implemented this way.

However, this appears to solve the issue on window.OnUpdate which I think is the most important.

Please build my Working2 branch and test it, you should see now both Status: Update #N on Rainmeter and on WebView are correctly synced. As well as the Measure's string value.

Also add
OnPageLoadAction=[!UpdateMeter *][!Redraw]

on the WebView measure to correctly see the "Initialized!" message on the status string.
Removed synchronous script execution function and adjusted script execution logic in Update function.
Renamed `OnFinishAction` to `OnWebViewLoadAction`

Added actions:
`OnWebViewFailAction`
`OnPageFirstLoadAction`
`OnPageReloadAction`

Added `raincontext` and `isFirstLoad` booleans.

Added `UpdateRaincontext()` function.
Added raincontext handling to the Measure class, including updates to the Reload function for new actions. Implemented UpdateRaincontext function to manage the raincontext state within the WebView.
Raincontext is now called AllowDualControl. The script is no longer injected when the option is disabled.
Added new actions.
Added new event listeners for triggering new actions.
Adding new options and actions.
@NSTechBytes NSTechBytes merged commit 7411a7f into main Dec 14, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants