-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Using evaluateJavascript to fix #9749 #9945
Conversation
By analyzing the blame information on this pull request, we identified @sathyapriya-31 and @jvassbo to be potential reviewers. |
Ping @mkonicek |
Doesn't it mean that the behaviour becomes inconsistent across Android versions? People might test on new Android versions and not realize that the same code will break on older Android versions. |
@satya164 So it's better tell the differences in the document, and display an YellowBox on older android devices? |
`evaluateJavascript` will preserve single line comment.
@leeight updated the pull request - view changes |
It's been a while since the last commit was reviewed and the labels show this pull request needs review. Based on the blame information for the files in this pull request we identified @jacobp100 as a potential reviewer. Could you take a look please or cc someone with more context? |
LGTM. There will obviously be some edge cases, where the ‘//‘ is in a string, but that probably is not worth trying to resolve. |
@@ -207,6 +207,14 @@ class WebView extends React.Component { | |||
console.warn('WebView: `source.body` is not supported when using GET.'); | |||
} | |||
|
|||
if (__DEV__) { | |||
if (this.props.injectedJavaScript | |||
&& this.props.injectedJavaScript.indexOf('//') !== -1) { |
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.
This will also cause warning if any string matches this
OK, Close it. |
#20366 should fix this in a way that behaves the same on all versions of Android |
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:
Use
evaluateJavascript
instead ofloadUrl
if possible, which will preserve the single line comment.Test plan (required)
Manually.