UPDATED - sorry
I'm working on a DC.js dashboard and I'm trying to provide a screenshot feature. Currently I develop a button that will called a DIV id that contains all the charts in it and convert the SVGs into Canvas so I can screenshot using the HTML2Canvas. Though during the process, I have to provide an inline style for the charts in order to make this works so I have to create a clone object that it wont make changes on the existing page. When I click on the button, I received this error on the console page in Developer Tool. The error is..
"Possible Unhandled Promise Rejection: TypeError: Unable to get property 'removeAttribute' of undefined or null reference."
I have to work on IE11 so this is kind of challenging due to limitations. I did implement the promise.js because IE11 doesn't support promise feature.
Example:
<div id="masterContainer">
... 'all the html, svg, etc. elements to create the charts'
</div>
In Javascript, I have a button that called the masterContainer and do its process.
function screenshot() {
var getContainer = $('#masterContainer');
var cloneObject = getContainer.clone(); -- I want to clone this div object along with the elements inside it.
elementsToCanvas(cloneObject); -- This is a function where it takes that html object and convert all the svgs, ect. to canvas. Also takes the cloneObject and apply it to html2canvas;
}
I just want to create a clone object for that masterContainer without making changes on the existing page... THOUGH it works without cloning the object but that made changes on the existing page. Please help.