bubkoo / html-to-image

βœ‚οΈ Generates an image from a DOM node using HTML5 canvas and SVG.
MIT License
5.39k stars 503 forks source link

feat: Added fetchRequestInitGenerator option #443

Open grijeshsaini opened 6 months ago

grijeshsaini commented 6 months ago

--

In scenarios where elements contain multiple URLs, including both internal and public links, there arises a need to supply distinct RequestInit configurations for various fetch requests.

Presently, the limitation lies in the fact that we can only provide a single fetchRequestInit, and this configuration is globally applied to all fetch calls for that element.

This proposed feature aims to enhance flexibility by enabling the provision of RequestInit configurations tailored to individual fetch requests based on their respective URLs. This enhancement ensures more granular control over the customization of fetch request behaviors, facilitating better handling of internal and public URLs.

Self Check before Merge

vivcat[bot] commented 6 months ago

πŸ‘‹ @grijeshsaini

πŸ’– 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:

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

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[bot] commented 6 months ago

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (b751cbf) 62.93% compared to head (7aee57e) 63.10%. Report is 4 commits behind head on master.

Files Patch % Lines
src/embed-webfonts.ts 0.00% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #443 +/- ## ========================================== + Coverage 62.93% 63.10% +0.17% ========================================== Files 10 10 Lines 580 580 Branches 143 143 ========================================== + Hits 365 366 +1 Misses 151 151 + Partials 64 63 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.