Skip to content

Conversation

@mariobodemann
Copy link
Collaborator

@mariobodemann mariobodemann commented Dec 3, 2025

While testing the wrapper we found that the initial implementation needed some more love.

This PR fixes cruicial local container creation, and adds love.

Use correct encoding and creation of clientDataJson
@mariobodemann
Copy link
Collaborator Author

Executing the test locally (revolutionary concept):

JS bridge error. expected:<"[]"> but was:<"[Exception: {\"message\":\"Failed to set the 'innerHTML' property on 'Element': This document requires 'TrustedHTML' assignment.\"}]">
at org.junit.Assert.assertEquals(Assert.java:117)
at com.yubico.ykbrowser.StartUpTest.javascriptInjectionIsCorrect(StartUpTest.kt:91)

I.e. someone from the maintainers (@tladesignz, or @jessevanmuijden maybe?) need to see how to fix the frontend requiring TrustedHTML in combination with adding the debug icon to the dom.

Good luck.

Copy link
Collaborator Author

@mariobodemann mariobodemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if I get the intent of the proposed changes. See inline for detailed feedback.

@jessevanmuijden
Copy link

@mariobodemann the proposed changes were just a suggestion to replace nested if statements with early returns for readability.

@mariobodemann
Copy link
Collaborator Author

Ah, I get the intent.

But that wouldn't work. In your suggestions you'll call the callbacks but you aren't exiting the function.

You'd need an explicit return, or nested ifs with the right value returned.

@tladesignz tladesignz merged commit 66d9b00 into main Jan 7, 2026
1 check failed
@tladesignz tladesignz deleted the fix/local-container branch January 7, 2026 14:36
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.

4 participants