Skip to content

WEB: External JS Lib Unable to find element created with HtmlElementView #50452

@MateusAmin

Description

@MateusAmin

I am embedding an external video which requires an iframe and external JS dependency. This is common practice among content sites. I suppose to allow for their ads and metrics.

The external lib fails to find the element. It is doing a lookup based on id: document.getElementById(t)

Related issue: #40080

If I reach out to the maintainers of the lib is there a generic query that will extend the id lookup to the shadow dom?

Steps to Reproduce

I will come back and do this later. Problem is well understood but I imagine it would convenient to have a test case.

  1. Run flutter create bug.
  2. Update the files as follows: ...
  3. ...

Expected results:

Actual results:

Logs
$ flutter doctor -v
[✓] Flutter (Channel dev, v1.15.2, on Linux, locale en_US.UTF-8)
    • Flutter version 1.15.2 at /home/mea/development/flutter
    • Framework revision d94ff4bdbe (3 days ago), 2020-02-06 13:19:46 -0800
    • Engine revision f34bc65bee
    • Dart version 2.8.0 (build 2.8.0-dev.7.0 b3396cbdca)

 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /home/mea/Android/Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /usr/local/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[!] Android Studio (version 3.5)
    • Android Studio at /usr/local/android-studio
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] VS Code (version 1.42.0)
    • VS Code at /usr/share/code
    • Flutter extension version 3.8.1

[✓] Connected device (2 available)
    • Chrome     • chrome     • web-javascript • Google Chrome 80.0.3987.87
    • Web Server • web-server • web-javascript • Flutter Tools

! Doctor found issues in 1 category.

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listc: new featureNothing broken; request for a new capabilityengineflutter/engine related. See also e: labels.platform-webWeb applications specifically

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions