Get started with cheval CDN
MPL-2.0 licensed
Cheval: Lightweight JS for HTML/XML parsing with CSS selectors.
Tags:- Clipboard
- Copy
- Copy text
- Copy to clipboard
Stable version
Copied!
How to start using cheval CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with cheval CDN - cdnhub.io</title>
<script src="https://cdn.cdnhub.io/cheval/2.0.0/cheval.min.js"></script>
<style>
#cheval-container {
width: 300px;
height: 300px;
border: 1px solid black;
}
</style>
</head>
<body>
<button id="generate">Generate Cheval Image</button>
<div id="cheval-container"></div>
<script>
const generateButton = document.getElementById('generate');
const chevalContainer = document.getElementById('cheval-container');
generateButton.addEventListener('click', () => {
Cheval.generateImage({
container: chevalContainer,
width: 300,
height: 300,
style: 'perlin',
seed: Math.random(),
colors: ['#ff0000', '#00ff00', '#0000ff']
});
});
</script>
</body>
</html>
Copied!
Copied!