FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add OnConnectionChangeFunc to WASM UIImpl to fix compilation by Copilot · Pull Request #331 · getlantern/unbounded · GitHub

Add OnConnectionChangeFunc to WASM UIImpl to fix compilation - #331

Merged
myleshorton merged 3 commits into
adam/unbounded-widget-proxyfrom
copilot/sub-pr-330
Feb 23, 2026
Merged

Add OnConnectionChangeFunc to WASM UIImpl to fix compilation#331
myleshorton merged 3 commits into
adam/unbounded-widget-proxyfrom
copilot/sub-pr-330

Conversation

Copilot AI commented Feb 23, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

The OnConnectionChangeFunc callback field was added to the non-WASM UIImpl struct but missing from the WASM version, causing compilation failures for WASM builds since both share the same BroflakeOptions struct.

Changes

  • Add OnConnectionChangeFunc field to WASM UIImpl struct in ui_wasm_impl.go
  • Update OnConsumerConnectionChange method to invoke callback before firing JavaScript event

Both implementations now have consistent callback support:

func (ui UIImpl) OnConsumerConnectionChange(state int, workerIdx int, addr net.IP) {
    if ui.OnConnectionChangeFunc != nil {
        ui.OnConnectionChangeFunc(state, workerIdx, addr)
    }
    // ... WASM-specific event firing continues
}

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI and others added 2 commits February 23, 2026 19:46
Co-authored-by: myleshorton <1143966+myleshorton@users.noreply.github.com>
Co-authored-by: myleshorton <1143966+myleshorton@users.noreply.github.com>
myleshorton marked this pull request as ready for review February 23, 2026 19:49
Copilot AI changed the title [WIP] Update implementation based on feedback for OnConnectionChangeFunc Add OnConnectionChangeFunc to WASM UIImpl to fix compilation Feb 23, 2026
myleshorton merged commit 29aa1c9 into adam/unbounded-widget-proxy Feb 23, 2026
myleshorton deleted the copilot/sub-pr-330 branch February 23, 2026 19:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL