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

Iframe receiving null attributes when working with CustomRender #475

Closed
JHBitencourt opened this issue Dec 29, 2020 · 0 comments · Fixed by #500
Closed

Iframe receiving null attributes when working with CustomRender #475

JHBitencourt opened this issue Dec 29, 2020 · 0 comments · Fixed by #500

Comments

@JHBitencourt
Copy link

Although the default iframe render works fine, both attributes and element parameters from CustomRender are aways null when using it with iframe:

Html(
  data:
      '<iframe src="https://google.com"></iframe>'
      '<iframe title="W3Schools Free Online Web Tutorials" src="https://www.w3schools.com/tags/demo_iframe_sandbox.htm"></iframe>'
      '<iframe width="560" height="315" src="https://www.youtube.com/embed/mfokPqeSNcw" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>',
  customRender: {
    'iframe' : (
        RenderContext context,
        Widget parsedChild,
        Map<String, String> attributes,
        dom.Element element,
    ) {
      print(element);
      print(attributes);
      return null;
    },
  }
)

flutter_html: ^1.1.1 and flutter_html: ^1.0.2

% fvm flutter doctor
FVM: Running version 1.22.2
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel unknown, 1.22.2, on Mac OS X 10.15.5 19F101, locale en-BR)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
[✓] Chrome - develop for the web
[!] Android Studio (version 4.1)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[!] IntelliJ IDEA Ultimate Edition (version 2019.2.4)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
[✓] Connected device (4 available)

This issue is similar to what #464 and #473 described, but I've opened a new one to be clear that the problem is when using iframe with CustomRender.

erickok added a commit to vrtdev/flutter_html that referenced this issue Jan 15, 2021
…e raw attributes in a iframe customRender
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant