Skip to content

Yield between progress reports#7

Merged
LotuxPunk merged 2 commits intomainfrom
fix/blocking-dom-on-chrome
Oct 17, 2025
Merged

Yield between progress reports#7
LotuxPunk merged 2 commits intomainfrom
fix/blocking-dom-on-chrome

Conversation

@trema96
Copy link
Contributor

@trema96 trema96 commented Oct 17, 2025

Changes to kerberus to ensure the resolveChallenge method yields at least between different progress reports.

JS

Due to recent changes to subtle crypto on chrome (sha and other methods now return fulfilled promises) resolveChallenge was no longer letting the DOM update between calls.

Kotlin yield doesn't seem to let js process the event queue reliably, to ensure kerberus behaves decently on Chrome we use a setTimeout(-, 0) for yielding from resolveChallenge in js.

A better solution would be to create a kerberus version in pure js which uses web workers (it is not possible to do it with kotiln due to coroutines not being able to run in a web worker context amongst others).

@LotuxPunk LotuxPunk merged commit faa2548 into main Oct 17, 2025
@LotuxPunk LotuxPunk deleted the fix/blocking-dom-on-chrome branch October 17, 2025 14:22
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