-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add base script for de-risking new WebViewCompat APIs #7034
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add base script for de-risking new WebViewCompat APIs #7034
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
ac2f5ab to
a48fefe
Compare
|
|
||
|
|
||
| if (postInitialPing) { | ||
| setTimeout(() => { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
a48fefe to
1078f2d
Compare
5a08c8b to
e5f0620
Compare
e5f0620 to
31f03cf
Compare
Merge activity
|

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