-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[webview_flutter_web] Add WebWebViewController.runJavaScript #10215
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
Closed
sophiebremer
wants to merge
8
commits into
flutter:main
from
sophiebremer:web_web_view_run_java_script
Closed
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
9b70fd2
Add WebWebViewController.runJavaScript
sophiebremer e11fc09
Replace polling with event listener in WebWebViewController
sophiebremer b4aba53
Limit event listener attachments in WebWebViewController
sophiebremer 7ad0ed2
Update changelog and version of webview_flutter_web
sophiebremer 74a592f
Add StateError to WebWebViewController.runJavaScript
sophiebremer 8e6d205
Add time out to WebWebViewController.loadHtmlString and runJavaScript
sophiebremer 80399a4
Update WebWebViewController tests
sophiebremer 332db20
Add test of runJavaScript StateError for origin mismatch
sophiebremer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,4 +5,4 @@ | |
|
|
||
| Google Inc. | ||
| Bodhi Mulders <info@bemacized.net> | ||
|
|
||
| Sophie Bremer | ||
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
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
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
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
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.
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.
team-webwill still need to do a full review, but in the meantime: won't this change toloadHtmlStringsilently break any case wherebaseUrlis passed, as a regression from the previous behavior?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 is valid concern. I see two different options to address it:
The previous implementation gets added as a fallback in the catch block.
We introduce a new controller parameter option to activate this PRs implementation and use the existing implementation by default as before.
What are your suggestions / thoughts?
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.
@mdebbar How do you want to handle branching for different origin setups?
Would the parameter add any information we don't already have? Can't we determine at runtime if the origins match?