html2canvas/tests/reftests/options/ignore-2.html
2021-08-04 20:58:17 +08:00

49 lines
990 B
HTML

<!DOCTYPE html>
<html>
<head>
<title>element render test</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script>
h2cOptions = {ignoreElements: function(element) {
return element.className === 'ignored';
}};
</script>
<script type="text/javascript" src="../../test.js"></script>
<style>
#div1 {
width: 100px;
height: 100px;
background: green;
}
#ignored, .ignored {
background: red;
width: 100px;
height: 100px;
}
body, html {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<div id="ignored" data-html2canvas-ignore>
great failure
</div>
<div class="ignored">
ignore predicate
</div>
<div id="div1">
great success
</div>
<script>
var forceElement = document.querySelector('#div1');
h2cSelector = forceElement;
</script>
</body>
</html>