Skip to content
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

[web] support retrieving hostElement for implicit view #150075

Closed
p-mazhnik opened this issue Jun 11, 2024 · 1 comment · Fixed by flutter/engine#53296
Closed

[web] support retrieving hostElement for implicit view #150075

p-mazhnik opened this issue Jun 11, 2024 · 1 comment · Fixed by flutter/engine#53296
Labels
c: new feature Nothing broken; request for a new capability c: proposal A detailed proposal for a change to Flutter engine flutter/engine repository. See also e: labels. P3 Issues that are less important to the Flutter project platform-web Web applications specifically team-web Owned by Web platform team triaged-web Triaged by Web platform team

Comments

@p-mazhnik
Copy link
Contributor

p-mazhnik commented Jun 11, 2024

ui_web.views.getHostElement API exists for packages to have a safe place on the DOM to inject additional content.
Currently, getHostElement only returns hostElement in a multi-view embedding scenario.

Proposal

The proposal suggests extending this functionality to also return hostElement for the implicit view, applicable to both full-page embedding scenarios and custom element embedding. This way, this API can be independent of the different embedding strategies, allowing web package authors to initiate code updates in preparation for the multi-view world.

Some good examples from the Flutter org codebase where this functionality can be useful include image_picker_for_web and ng-flutter sample.

Related to #138930

@huycozy huycozy added in triage Presently being triaged by the triage team c: new feature Nothing broken; request for a new capability engine flutter/engine repository. See also e: labels. platform-web Web applications specifically c: proposal A detailed proposal for a change to Flutter team-web Owned by Web platform team and removed in triage Presently being triaged by the triage team labels Jun 12, 2024
@yjbanov yjbanov added P3 Issues that are less important to the Flutter project triaged-web Triaged by Web platform team labels Jun 20, 2024
auto-submit bot pushed a commit to flutter/engine that referenced this issue Jul 11, 2024
This PR updates `ui_web.views.getHostElement` API to also return `hostElement` for implicit view.

Resolves flutter/flutter#150075
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: new feature Nothing broken; request for a new capability c: proposal A detailed proposal for a change to Flutter engine flutter/engine repository. See also e: labels. P3 Issues that are less important to the Flutter project platform-web Web applications specifically team-web Owned by Web platform team triaged-web Triaged by Web platform team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants