Skip to content

Add LocalNetworkAccess detection#1441

Open
tresf wants to merge 12 commits intomasterfrom
lna-js
Open

Add LocalNetworkAccess detection#1441
tresf wants to merge 12 commits intomasterfrom
lna-js

Conversation

@tresf
Copy link
Copy Markdown
Contributor

@tresf tresf commented Apr 15, 2026

Allow qz-tray.js to notify in a usable error when LocalNetworkAccess restrictions prevent a connection.

Detailed write-up here: https://qz.io/docs/lna

Closes #1382

lukas-w added 11 commits April 5, 2026 15:41
Remove `_qz.websocket.connection != null` check which is always true
_qz.websocket.connection.established is only ever read in one place and
can effectively be replaced by _qz.websocket.connection !== null
Extract WebSocket open attempt to dedicated function `connectToAddress`
Remove Safari check for onclose error handling. A close event before an
open event can always be considered a connection failure. This is safe
because we cleanup the event handler immediately after the open event.
- Move WebSocket constructor inside of the promise executor, so that all
  errors result in a rejected Promise, not an exception
- Remove redundant `_qz.websocket.connection = null` in promise reject
Comment thread sample.html Outdated
Ref 39aaac4d24404be2debf0dcafcf8ccabda12d79e
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.

Detect permission state of Local Network Access setting

3 participants