[web] support retrieving hostElement for implicit view #150075
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
ui_web.views.getHostElement
API exists for packages to have a safe place on the DOM to inject additional content.Currently,
getHostElement
only returnshostElement
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
The text was updated successfully, but these errors were encountered: