I do not know but This question might have straight forward answer that "Not Possible" ? But I think definately there should be a way to do this, May be using some OS level work. My Question can be better understand by watching this code.
<html>
<head>
</head>
<body>
<div> .......... </div>
<div> .......... </div>
<div> .......... </div>
<div> .......... </div>
<div id="my-required-section"> .......... </div>
<div> .......... </div>
<div> .......... </div>
<div> .......... </div>
<div> .......... </div>
<div> .......... </div>
</body>
This complete html is the rendered DOM after all server side and client side code has been executed. Now I have Browser view of this complete page DOM, I just want to get SnapShot of a specific part for example the Browser view of a particular div with id =
my-required-section
.
In Other Word -
Lets suppose take complete snapshot of this DOM from
<html>
to</html>
than crop only a part (represented by that DIV with idmy-required-section
)
I will be thank full Even if you suggest me a good article related to this kind of problem.
I will add more context to the problem for better understanding the problem.
- I have complete HTML code inside a that particular DIV. But How can I get the CSS property of it parent elements, because What I want is exact designed snapshot of that div when we see that by Inspect element through chrome developer tool