Preventing some elements from being rendering
See original GitHub issueIs it possible to prevent a few elements from being rendered? I’d like to renderer the entire page (document.body
) except for a few specific div
s, which are there to help the user take the screenshot. I tried to use the ignoreElements
option, but it seems to ignore all elements of a type, which is not really what I want.
I was checking http://experiments.hertzen.com/jsfeedback/ and they seem to do what I want. As far as I can tell, they have modified html2canvas.js
in order to do so. It would be interesting if this feature existed in the original code.
Thanks a lot.
Issue Analytics
- State:
- Created 11 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
How to prevent a component from rendering ? - GeeksforGeeks
When UI is designed using React, we come across a situation when components are to be rendered on the screen based upon some...
Read more >5 Ways to Avoid React Component Re-Renderings
In this article, I have discussed 5 different methods to prevent unnecessary re-rendering in React components. Most of these solutions capitalize caching, and ......
Read more >How to elegantly prevent certain elements being rendered on ...
So I want to prevent certain elements (e.g. ads banners) which I know their html/css properties, for example, they will have a class...
Read more >How to stop re-rendering lists in React? - Alex Sidorenko
Components always re-render. First, let's simplify our example by removing all props from the Item . We will still update the parent state...
Read more >Optimizing React performance by preventing unnecessary re ...
Only re-rendering React components when necessary can make app your faster. This article explains how to reduce re-renders and avoid common ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
ALL HAIL! I just found “data-html2canvas-ignore” to ignore element from rendering. It saved my career. Thanks!
Setting the element attribute
data-html2canvas-ignore="true"
should exclude it from rendering.edit: infact, not sure whether I pushed that change to this repo yet or not. You could always grab the html2canvas.js copy from the feedback.js repo for now.