File size: 420 Bytes
49cc1fb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
document.addEventListener("DOMContentLoaded", () => {
    const app = alpinejs();
    const scooby = {
        title: "Scooby-Doo",
        image: "../assets/scooby.jpg",
    };

    app.init({
        state: {
            scooby,
        },
        func: {
            onSubmit(key) {
                // Code to create the image goes here
                console.log("Submitted!");
            },
        },
    });
});