[webview_flutter] Update webview_flutter (2.3.0) #269
Merged
bbrto21 merged 2 commits intoflutter-tizen:masterfrom Nov 9, 2021
Merged
[webview_flutter] Update webview_flutter (2.3.0) #269bbrto21 merged 2 commits intoflutter-tizen:masterfrom
bbrto21 merged 2 commits intoflutter-tizen:masterfrom
Conversation
3022252 to
21b4c0e
Compare
21b4c0e to
66b1a88
Compare
Signed-off-by: MuHong Byun <mh.byun@samsung.com>
66b1a88 to
b9be266
Compare
b9be266 to
cfcf915
Compare
Member
Author
|
@HakkyuKim @seungsoo47 @bbrto21 |
Contributor
|
The problem below can be fixed after this PR. we can ignore it. |
bbrto21
approved these changes
Nov 9, 2021
HakkyuKim
reviewed
Nov 9, 2021
Comment on lines
+863
to
+876
| } else if (method_name.compare("runJavascript") == 0) { | ||
| if (std::holds_alternative<std::string>(arguments)) { | ||
| std::string js_string = std::get<std::string>(arguments); | ||
| webview_instance_->EvaluateJavaScript( | ||
| js_string, [res = result.release()](std::string value) { | ||
| LOG_DEBUG("value: %s\n", value.c_str()); | ||
| if (res) { | ||
| res->Success(); | ||
| delete res; | ||
| } | ||
| }); | ||
| } else { | ||
| result->Error("InvalidArguments", "Please set javascript string"); | ||
| } |
Contributor
There was a problem hiding this comment.
How about:
else if (method_name.compare("evaluateJavascript") == 0 ||
method_name.compare("runJavascriptReturningResult") == 0 ||
method_name.compare("runJavascript") == 0) {
if (std::holds_alternative<std::string>(arguments)) {
std::string js_string = std::get<std::string>(arguments);
webview_instance_->EvaluateJavaScript(
js_string, [res = result.release()](std::string value) {
LOG_DEBUG("value: %s\n", value.c_str());
if (res) {
bool returns_value =
method_name.compare("runJavascript") == 0 ? false : true;
if (returns_value) {
res->Success(flutter::EncodableValue(value));
} else {
res->Success();
}
delete res;
}
});
} else {
result->Error("InvalidArguments", "Please set javascript string");
}
}
Member
Author
There was a problem hiding this comment.
This one is much better, thank you! 👍
Contributor
OK, all analyze errors are related to |
Signed-off-by: MuHong Byun <mh.byun@samsung.com>
bwikbs
added a commit
to bwikbs/plugins
that referenced
this pull request
Mar 26, 2022
* [webview_flutter] Update webview_flutter (2.3.0) Signed-off-by: MuHong Byun <mh.byun@samsung.com> * Apply reviewer's comment Signed-off-by: MuHong Byun <mh.byun@samsung.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
webview_flutter
2.3.0#267