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

fix: iframe content displayed incorrectly #351

Closed
wants to merge 1 commit into from

Conversation

haodaking
Copy link

This pull request addresses the issue with capturing iframes in the library, where the resulting images were blank or incorrect.

Description

https://stackoverflow.com/questions/26248599/instanceof-htmlelement-in-iframe-is-not-element-or-object

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Enhancement (changes that improvement of current feature or performance)
  • Refactoring (changes that neither fixes a bug nor adds a feature)
  • Test Case (changes that add missing tests or correct existing tests)
  • Code style optimization (changes that do not affect the meaning of the code)
  • Docs (changes that only update documentation)
  • Chore (changes that don't modify src or test files)

Self Check before Merge

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@biiibooo
Copy link
Contributor

biiibooo bot commented Dec 27, 2022

👋 @haodaking

💖 Thanks for opening this pull request! 💖

Please follow the contributing guidelines. And we use semantic commit messages to streamline the release process.

Examples of commit messages with semantic prefixes:

  • fix: don't overwrite prevent_default if default wasn't prevented
  • feat: add graph.scale() method
  • docs: graph.getShortestPath is now available

Things that will help get your PR across the finish line:

  • Follow the TypeScript coding style.
  • Run npm run lint locally to catch formatting errors earlier.
  • Document any user-facing changes you've made.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

@codecov
Copy link

codecov bot commented Dec 27, 2022

Codecov Report

Base: 63.24% // Head: 63.24% // No change to project coverage 👍

Coverage data is based on head (130f2f9) compared to base (7a83b54).
Patch coverage: 60.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #351   +/-   ##
=======================================
  Coverage   63.24%   63.24%           
=======================================
  Files          10       10           
  Lines         555      555           
  Branches      129      129           
=======================================
  Hits          351      351           
  Misses        146      146           
  Partials       58       58           
Impacted Files Coverage Δ
src/util.ts 60.86% <ø> (ø)
src/clone-node.ts 75.92% <50.00%> (ø)
src/embed-images.ts 81.81% <83.33%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@DustinBrett
Copy link
Contributor

DustinBrett commented Dec 28, 2022

Thanks for this PR and finding the core issues. I've decided to make my own PR (#352) as I feel in some ways I've introduced this issue. I am not sure on the etiquette of conflicting PR's in open source. Sorry if I stepped on toes but I prefer to create my own PR in this case. I felt the tagName approach although effective could maybe be adjusted to use something more generic, and I also didn't see a need for a few other changes in the PR. So I made mine to focus on what I considered required to complete my original PR where I claimed to add iframes as a whole.

@haodaking
Copy link
Author

Thanks for this PR and finding the core issues. I've decided to make my own PR (#352) as I feel in some ways I've introduced this issue. I am not sure on the etiquette of conflicting PR's in open source. Sorry if I stepped on toes but I prefer to create my own PR in this case. I felt the tagName approach although effective could maybe be adjusted to use something more generic, and I also didn't see a need for a few other changes in the PR. So I made mine to focus on what I considered required to complete my original PR where I claimed to add iframes as a whole.

Thank you, I think your code implementation is more elegant and learning.

@haodaking haodaking mentioned this pull request Dec 29, 2022
15 tasks
@haodaking haodaking closed this Dec 29, 2022
@haodaking haodaking deleted the iframe branch December 29, 2022 05:38
@haodaking haodaking restored the iframe branch December 29, 2022 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants