Skip to content

Conversation

@CrisBarreiro
Copy link
Contributor

Task/Issue URL: https://app.asana.com/1/137249556945/task/1211755269770776?focus=true

Description

Create base script to be used as a test bed. Script contains placeholder so it can be configured as needed from native

Steps to test this PR

n/a

UI changes

n/a

Copy link
Contributor Author

CrisBarreiro commented Oct 30, 2025

@CrisBarreiro CrisBarreiro force-pushed the feature/cris/derisk-webviewcompat/create-js-script branch from ac2f5ab to a48fefe Compare October 30, 2025 14:56


if (postInitialPing) {
setTimeout(() => {
Copy link
Member

Choose a reason for hiding this comment

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

nit, maybe should avoid the use of setTimeout if delay is precisely 0.

I don't know if it matters, but prod scripts will likely either eagerly try do something or use setTimeout with a real delay value; I wouldn't want to miss a problem testing the eager stuff if setTimeout() => {}, 0) was functionally different than just executing immediately.

}


webViewCompatTestObj.onmessage = function(event) {
Copy link
Member

Choose a reason for hiding this comment

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

does it matter if native haven't defined a web message listener? e.g., will webViewCompatTestObj not being defined cause an issue?

Copy link
Contributor Author

@CrisBarreiro CrisBarreiro Oct 31, 2025

Choose a reason for hiding this comment

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

We will have some sort of message listener for all testing scenarios, so it shouldn't be a concern. Also, we don't have a proper way to know if a listener is defined on the native side. In any case, AFAIK, if no listener is defined, we'll see a log in Chrome console, but otherwise, the script would work as normal, with messages being, of course, ignored by native

@CrisBarreiro CrisBarreiro force-pushed the feature/cris/derisk-webviewcompat/create-js-script branch from a48fefe to 1078f2d Compare November 3, 2025 11:24
@CrisBarreiro CrisBarreiro mentioned this pull request Nov 3, 2025
35 tasks
@CrisBarreiro CrisBarreiro force-pushed the feature/cris/derisk-webviewcompat/create-js-script branch from 5a08c8b to e5f0620 Compare November 3, 2025 16:11
@CrisBarreiro CrisBarreiro force-pushed the feature/cris/derisk-webviewcompat/create-js-script branch from e5f0620 to 31f03cf Compare November 4, 2025 09:15
Copy link
Contributor Author

CrisBarreiro commented Nov 4, 2025

Merge activity

  • Nov 4, 11:09 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Nov 4, 11:10 AM UTC: @CrisBarreiro merged this pull request with Graphite.

@CrisBarreiro CrisBarreiro merged commit c06a4fc into develop Nov 4, 2025
7 checks passed
@CrisBarreiro CrisBarreiro deleted the feature/cris/derisk-webviewcompat/create-js-script branch November 4, 2025 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants