feat(chromium): screenshot a single element via the selector form field (#947)

This commit is contained in:
Julien Neuhart
2026-08-13 13:56:17 +02:00
parent 2f6818d3df
commit 8d1eeaa73a
9 changed files with 184 additions and 2 deletions

View File

@@ -0,0 +1,28 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Element screenshot</title>
<style>
body {
margin: 0;
padding: 40px;
background: #ffffff;
}
/* A spacer pushes the target away from the origin so the clip has to
account for the element offset, not just its size. */
.spacer {
height: 120px;
}
#target {
width: 300px;
height: 200px;
background: #ff0000;
}
</style>
</head>
<body>
<div class="spacer"></div>
<div id="target"></div>
</body>
</html>