Skip to content

[web] support retrieving hostElement for implicit view #150075

@p-mazhnik

Description

@p-mazhnik

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterengineflutter/engine related. See also e: labels.platform-webWeb applications specificallyteam-webOwned by Web platform teamtriaged-webTriaged by Web platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions